I have put some of my properties for my actors into structs. In these structs, I can of course set the category for UPROPERTY() members or for the USTRUCT as a whole.
When adding that struct as a member to the actor, I declare it as a UPROPERTY as well and give it a category.
When now adding the actor to the scene, in my details panel only the category set in the Actor’s UPROPERTY macro for the struct are displayed.
Here is a minimal example:
struct code
USTRUCT(BlueprintType, Category="BaseStructProperty")
struct FStructProperties
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "BaseProperty")
FString Name;
};
actor code excerpt
public:
UPROPERTY(EditAnywhere, Category = "Properties")
FStructProperties properties;
The result in the editor details panel:
Therefore my question:
How do I get the structs property into the editor? Especially, since I’m planning to use inheritance on the structs and want to visually separate the properties into class related properties.
Alternatively, is there a way to dynamically generate the Category strings?