Hey team,
I have run into an issue where a custom c++ UStruct will be cleared on a blueprint compile if it only has a single item within it if the item has not been modified. It works fine with 2, or with a changed single UStruct.
Video of bug:
https://youtu.be/NhkbWP7176w
This is running in a brand new widget blueprint with no functions. The array/ustruct structure is as follows:
//Within MyTestClass.h, which is the parent class of the UMG widget
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Tool Tips")
TArray<FToolTipElementStruct> ToolTipValues;
Enum - ELuaParameterType
UENUM(BlueprintType)
enum class ELuaParameterType : uint8
{
LFPT_Float UMETA(DisplayName = "Float"),
LFPT_String UMETA(DisplayName = "String"),
LFPT_Int32 UMETA(DisplayName = "Int32"),
LFPT_Bool UMETA(DisplayName = "Bool"),
};
FToolTipElementStruct
USTRUCT()
struct FToolTipElementStruct
{
GENERATED_USTRUCT_BODY()
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Tool Tips")
FLuaFunctionStruct Data;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Tool Tips")
FText TitleText;
};
FLuaFunctionStruct
USTRUCT()
struct FLuaFunctionStruct
{
GENERATED_USTRUCT_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Lua Function")
FString functionName;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Lua Function")
FString memberObjectInstance;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Lua Function")
TArray<FLuaFunctionParameter> parameters;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Lua Function")
TArray<FLuaFunctionParameter> returnParameters;
};
FToolTipElementStruct
USTRUCT()
struct FLuaFunctionParameter
{
GENERATED_USTRUCT_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Lua Function")
ELuaParameterType type;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Lua Function")
float floatValue;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Lua Function")
int32 intValue;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Lua Function")
FString stringValue;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Lua Function")
bool boolValue;
};
Cheers,
Mugen