Aissasa
(Aissasa)
October 13, 2017, 6:48pm
1
Greetings,
Is there a way to use EditCondition meta with an enum instead of a boolean?
I know I can do this:
UPROPERTY(EditDefaultsOnly)
bool IsChannelable;
UPROPERTY(EditDefaultsOnly, meta = (EditCondition = IsChannelable))
float MaxChannelingTime;
But can I do something like this:
UPROPERTY(EditAnywhere, Category = "Basic Properties")
EAbilityType AbilityType;
UPROPERTY(EditDefaultsOnly, meta = (EditCondition = "AbilityType == EAbilityType::VE_Active"))
float ActivateTime;
Any help would be appreciated.
Aissasa
(Aissasa)
October 13, 2017, 8:59pm
2
I see. Yeah, it’s not that big of a deal, it was just for convenience sake. Thank you for the info, though.
Nachtmahr
(Nachtmahr)
October 13, 2017, 8:56pm
3
Nope, for that you need a DetailsCustomization. EditCondition takes no expressions (except “!”). If your Ability System is Complex enough I would go for a Details Customization, otherwise just ignore that the Value is editable.
Nachtmahr
(Nachtmahr)
July 22, 2018, 2:54pm
5
Good catch tottaly forgot about that =)
Aissasa
(Aissasa)
July 24, 2018, 3:18am
6
Oh! That’s pretty nice actually. I can’t wait to play around with that.
pdenton
(Leszek GĂłrniak)
September 21, 2024, 7:59am
7
In 5.4 you can totally do that . : )
Example from my project:
UPROPERTY(EditAnywhere, meta = (EditCondition = "TraceType == ETraceType::SPHERE"), Category = "Damage Causing Trace")
float TraceSphereRadius = 100.f;