Sometimes you want to make some properties only available for editing if the
object is a certain type.
Imagine we have a farming game, and we let game designers create plant
definitions. We add a property
FlowerColor, but we want to make it clear that
this is only used if the plant has flowers.
We can use the meta flag
meta=(EditCondition="bHasFlowers") to make this
property only editable if the
bHasFlowers value is true.
Similarly, we can make properties that are only available if a variable is
false with the exclamation-mark prefix, e.g.
Advanced Example using
In the example above we saw a way of making a property read-only with a boolean
variable. But what can we do for more advanced conditions?
We can do this with the
CanEditChange function, which allows us to write any
kind of conditions we want in C++.