Is it possible to generate an error in the editor from c++?
I would like to know if it is possible to generate an error in the editor from c++ (or any other way) when certain values are set. For example, I have a door class that has:
DoorState - Either "Opened" or "Closed" IsLocked - either "True" or "False"
I would like to generate an error in the editor when the user selects "Opened" and "Locked" as this should not be a possible state for a door.
asked Mar 23 '19 at 08:36 PM in C++ Programming
There CheckForErrors() function you can override:
And also IsDataValid:
Not sure about you enum states, but there a lot smoother solution, there property meta specifier called EditCondition where you put name of bool property in and it will disable the property if it's false, you can also invert this condition with ! in property name. So in your case:
And 3rd solution... is simply ignore this state and assume it open, you can also put warning in log that this state should be impossible and state will fallback to opened for example
Follow this question
Once you sign in you will be able to subscribe for any updates here