Hello!
I’m trying to block the edition of some properties of a struct, if the value of another property of the struct, which is a bitmask that may contain several values from an Enum, contains a certain Enum value.
I’m using the EditCondition meta of the properties I want to block. It works, but if you expand the properties of the struct in the editor, making it process the EditConditions of said properties, the output log is spammed with a never-ending, repeating stream of warning messages that slows down the editor and eventually freezes it completely.
The Enum declaration in file A:
UENUM(meta = (BitFlags, UseEnumValuesAsMaskValuesInEditor = "true"))
enum class ENTCameraPropertyFlags : uint16
{
None = 0 UMETA(Hidden),
Pitch = 1 << (uint16)ENTCameraProperty::Pitch, // 1 (0x0001)
Yaw = 1 << (uint16)ENTCameraProperty::Yaw, // 2 (0x0002)
Roll = 1 << (uint16)ENTCameraProperty::Roll, // 4 (0x0004)
(...)
};
ENUM_CLASS_FLAGS(ENTCameraPropertyFlags);
The Struct declaration in file B:
USTRUCT(BlueprintType)
struct NTCAMERA_API FNTCameraTweak
{
GENERATED_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite)
bool bIsAbsolute = false;
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (EditCondition = "bIsAbsolute", EditConditionHides, Bitmask, BitmaskEnum = "/Script/NTCamera.ENTCameraPropertyFlags"))
int32 AbsolutePropertiesToSet = 0;
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (EditCondition = "!bIsAbsolute || AbsolutePropertiesToSet & ENTCameraPropertyFlags::Pitch"))
float Pitch = 0.0f;
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (EditCondition = "!bIsAbsolute || AbsolutePropertiesToSet & ENTCameraPropertyFlags::Yaw"))
float Yaw = 0.0f;
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (EditCondition = "!bIsAbsolute || AbsolutePropertiesToSet & ENTCameraPropertyFlags::Roll"))
float Roll = 0.0f;
(...)
};
The spammed message:
LogClass: Warning: Short type name "ENTCameraPropertyFlags" provided for TryFindType. Please convert it to a path name (suggested: "/Script/NTCamera.ENTCameraPropertyFlags"). Callstack: (...)
Obs.: This worked just fine until Unreal 5.1. It just started acting up now, with the upgrade to 5.2. I’ve tried using the full suggested enum path within the EditConditions, it doesn’t work.