I would like to have an enum in my classin which the user can select a mode.
Based on this mode more properties should show up.
Do you know any way to do this.
A example is in the skeletal mesh component you can select the animation mode and based on this you can either select an animation blueprint or an animation asset. But I couldn’t figure out how to do this
You might be looking for UENUM? Using the keyword lets you define an enum type that can be displayed in any slate widget in the editor’s UI. Here is an example:
Yeah I got an UENUM in my class and it is shown in the editor properly.
But I would like to do, is to have another property that is shown in the editor based on what the user select in the enum
For example I have an
enum Mode
{
ModeA
ModeB
}
and 2 properties 1 of the type A and 1 of the type B, if the user selects ModeA I want to shown him property A and let him edit it. But if he selects ModeB, property A is not shown and only property B is shown and can be edited.
No, only property limiting build in features i know is for bools with EditCondition specifier on URPOPERTY(). Beyond that you need to do detail panel customization as Greywacke said. The animation mode is actually done that way in Skeletal Mesh component customization: