Hi there,
i have my native USTRUCT build like this
it should add make/break functions in blueprinting but it does not.
Can you tell me whats going on?
EDIT: to make it work after 4.6 change USTRUCT() to USTRUCT(blueprintable).
FInventoryItemData is another UStruct both have their members as properties
thanks for any help!
i have my native USTRUCT build like this
Code:
USTRUCT() struct FInventoryItemData { GENERATED_USTRUCT_BODY() //Always make USTRUCT variables into UPROPERTY() // any non-UPROPERTY() struct vars are not replicated // So to simplify your life for later debugging, always use UPROPERTY() UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Item) FItemData ItemData; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Item) UUserWidget* ItemWidget; //Set void SetItemData(FItemData NewValue) { ItemData = NewValue; } void SetItemWidget(UUserWidget* NewValue) { ItemWidget = NewValue; } //Get FItemData GetItemData() { return ItemData; } UUserWidget* GetItemWidget() { return ItemWidget; } //Constructor FInventoryItemData() { //Always initialize your USTRUCT variables! // exception is if you know the variable type has its own default constructor FInventoryItemData* ItemData = NULL; UUserWidget* ItemWidget = NULL; } }; //Always remember this ; at the end! You will get odd compile errors otherwise
Can you tell me whats going on?
EDIT: to make it work after 4.6 change USTRUCT() to USTRUCT(blueprintable).
FInventoryItemData is another UStruct both have their members as properties
thanks for any help!
Comment