Is it possible to put OR into EditCondition

Hello!

I want to show property if enum equals to THIS or THAT.
Like here:

meta = (EditCondition = "ItemType == EItemAssetType::Ammo || ItemType == EItemAssetType::Weapon")

Is it possible?

inside of the engine in MLDeformVizSettings.h you have an example of many condition parameters used in tandem.

UPROPERTY(EditAnywhere, Transient, Category = "Live Settings", meta = (EditCondition = "HeatMapMode==EMLDeformerHeatMapMode::GroundTruth && bShowHeatMap", UIMin = "0.0", UIMax = "1.0", ClampMin = "0.0", ClampMax = "1.0"))
float GroundTruthLerp = 0.0f;

So your or condition should work, the engine acknowledges more than one parameter per condition.

Here is an engine snippet that uses the or in it’s edit condition :slight_smile:

/** Stretch stiffness warp override value.*/
UPROPERTY(EditAnywhere, Category = "Stretch Override", meta = (ClampMin = "0", EditCondition = "(OverrideStretchStiffness == EChaosClothAssetConstraintOverrideType::None || !bApplyUniformStretchStiffnessOverride) && OverrideStretchStiffnessWarp != EChaosClothAssetConstraintOverrideType::None", EditConditionHides))
FChaosClothAssetWeightedValueOverride StretchStiffnessWarp;
1 Like

Thank you!
My code wasn’t compiling at all. And I thought that EditCondition thing was the problem. It wasn’t.
You made this clear and i’ve finally found the culprit :smiley: