I have a custom device in which I added some @editable devices to expose in UEFN. Some of them are mandatory but some are optional, to allow for more freedom in behaviour implementation.
I’m not sure how to check whether an editable device has been specified in UEFN or not. I suppose there must be some sort of IsValid() function inherited from the base device class, but I failed to find it.
game_manager_device := class(creative_device):
@editable
TestDevice: mutator_zone_device= mutator_zone_device{}
# Runs when the device is started in a running game
OnBegin<override>()<suspends>:void=
# Does something with TestDevice if it is set properly
The issue with the code above is, that forgetting to set the TestDevice in the Editor leaves to VerseRuntimeErrors. The is currently no way to check if the editable mutator_zone_device is actually a valid reference.