While working on level editor, I saw some threads and questions about EditCondition meta specifier.
But All examples show use of a single boolean variable as below.
UPROPERTY(EditAnywhere, Category = Game, meta = (EditCondition = "bCanIUse"))
Can I use multiple boolean variables for checking condition with boolean operation?
EditCondition is essentially a shortcut for doing just a very basic check, there is no flexibility. If you need any more control, you need to look into detail customization. There is an excellent intro here. It’s a touch outdated, but there are heaps of up to date examples of use in the engine code, just search for occurrences of IDetailLayoutBuilder.
It’s a fair bit more involved, but once you get the hang of it it’s pretty straightforward and gives you complete control. Essentially what you want to do in this case is call AddProperty() on your category, and then on the returned reference call Visibility() and pass in a delegate in which you can put whatever code you like to determine if your property should be shown. Again, the engine code is full of examples doing precisely this.
Thanks. I tried through your link, but compile error occurs in IDetailCategoryBuilder. I solved my problem by grouping variables with struct so that two editCondition is applied. If there is on the fly documents and convenient way to customize detail panel, that would be very helpful to make fully utilized editor for every games.
Okay glad you got something working. If you need to do anything more complex then the details customization is definitely the way to go. I guess maybe the error you encountered is because the GetProperty() method has now been moved I think, from IDetailCategoryBuilder to IDetailLayoutBuilder. If you want to give it another go, I suggest watching this excellent stream about extending the editor for more info.
You can have multiple bools as the Original Poster asked. The bit that is slightly unexpected is the bools and the operator need to be in quotes like follows:
UPROPERTY(EditAnywhere, Meta = (EditCondition = "ConsumeOnTriggerActivator && DoesActivatorResetAfterConsume"))
float ConsumeResetDelay;