Josiah-Kunz / Gene-Hunter

Gene Hunter is a monster catcher game created in Unreal Engine 5. It is in the same genre as Pokémon, but it is not a clone and has no affiliation. See README.md for more info or email AskGeneHunter@gmail.com
3 stars 0 forks source link

Destroying Stats/Level #51

Closed Josiah-Kunz closed 1 year ago

Josiah-Kunz commented 1 year ago

When you delete either UStatsComponent or ULevelComponent (or both?) you get this error in editor:

image

Josiah-Kunz commented 1 year ago

Problem was raised by the AffinitiesComponentDrawer when getting UType assets. Changed:

AssetRegistryModule.Get().GetAssetsByClass(FTopLevelAssetPath(TEXT("Type")), TypeAssets, false);

to

AssetRegistryModule.Get().GetAssetsByClass(UType::StaticClass()->GetClassPathName(), TypeAssets, false);

(which is much safer btw)