How do I make UPROPERTIES depend on each other?

Hey guys,

I’m developing a plugin and I want certain variables to essentially be children of another one. It’s just like a lot of the other properties that are in Unreal by default, where one setting will have a drop down menu with indented settings underneath, and those settings will be greyed out (read only) unless the top setting is true. I assume the answer lies in UPROPERTY metadata, but I scrolled through the API and couldn’t find what I was looking for. It’s obviously possible, so does anyone know how to do it? I really appreciate it.

—Tyler

I don’t think you can make a dropdown portion, but you can enable/disable editing:
UPROPERTY(meta = (EditCondition = %YourBoolOrCondition%))

The EditconditionHides could maybe help you, hiding some inputs depending on value selected from an enum in a dropdown.
Also check InlineCategoryProperty.
Here is an Excellent Tutorial by Rudy Triplett covering the EditConditions - worth to check in any case.

1 Like

That’s good to know! But I personally wouldn’t hide the options. The engine itself in most cases doesn’t hide them, just disables. This way you can see that there are some additional options and you can deduct which checkbox enables them. If you don’t see anything additional, you probably won’t go clicking each checkbox to see if it will show you something else.

@herb64 @Tuerer The two of you are amazing! These things are exactly what I’m looking for. Thank you guys so much!