Daily Unreal Column #23 - Property edit condition
A way to make blueprints setup more accessible to the rest of your team.
I'm pretty sure that there have been times when you opened a blueprint default properties and felt overwhelmed. EditCondition
is a meta tag for blueprint exposed properties that can help you make your blueprints friendlier.
The meta tag allows to define a condition determining whether this property should be editable or not. Here is a code for declaring such property:
.
.
.
UPROPERTY(EditDefaultsOnly)
bool bMyFlag = false;
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, meta = (EditCondition="bMyFlag == true"))
float AwesomeValue = 1.0f;
.
.
.
The above code will look and behave like this in the editor:
There is also EditConditionHides
meta tag. Adding it to the above declaration next to EditCondition
will make the disabled property to disappear from the property panel completely.