Editor - FStringClassReference Crash when editing

Hi,

Following Ben Zeigler Recommendation for BP Class reference I implemented that in my code and I’m facing 2 types of issue:

1 - AsyncLoading of FStringClassReference is not available as of 4.1.1
2 - So I switch to an non Async implementation and when I create my DataAsset in the editor and then edit it, I have an error message:

D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.1\Engine\Source\Runtime\Core\Private\Misc\OutputDevice.cpp(176): Fatal error:
Assertion failed: !MetaClassName.IsEmpty() [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.1\Engine\Source\Editor\DetailCustomizations\Private\StringClassReferenceCustomization.cpp] [Line: 28]

In fact, here what happen:
1 - I can create the DataAsset as of MyClass
2 - I opend the DataAsset Editor without any isssue
3 - When I tried to add an item in my Array of Struct the error pop-up.

The FStringClassReference is in my struct and defined with: UPROPERTY(EditDefaultsOnly, Category = Test)

I look in the source code, and I can see that the function that crashed is : CustomizeStructHeader.

It seems that the “MetaClass” is empty, but I have no clue what that’s means.

Thanks for your help.

Hi,

Was this bug “confirmed” ?
Is it fixed in 4.2?

Thanks,

It looks like you need to specify some meta data, here’s an example from Engine.h

UPROPERTY(globalconfig, noclear, EditAnywhere, Category=DefaultClasses, meta=(MetaClass="Console", DisplayName="Console Class"))
FStringClassReference ConsoleClassName;

It looks like there’s no automatic way to do async loading on a StringClassReference, but you can first convert it to a StringAssetReference and then do it that way.

StringAssetReference(ClassRef.ClassName) should work, then you can pass that into a streamable manager.

I’ll file a bug to get StringClassReference working more like StringAssetReference, I do not believe it will work correctly with cooking or fixupredirets