Playmaker 1.9.1p15 unity 18.3.6f
I have created a new action and have had to write a custom editor for the action due to wanting to put in a custom dropdown that is searchable. I have used EditField() for a couple of the fields in the action, but have written custom code for one of the fields, which is an FSMInt. I have declared
FSMInt id;
then the custom editor code actually does a bunch of stuff to convert item in a list to the proper id, etc. But the one thing that I've found is that id is null when the object is first created. I had to do
public override void Reset()
{
id = new FsmInt(0);
}
in order to not have uinhandled exceptions in the action Reset code so that id is not null in the custom editor. Why is this? It just seems strange that I don't have to do this for other variables that are edited with EditField so I suspect something is happening behind the scenes.
I'm fine with this solution, but just want to make sure that I'm not missing something subtle or buggy.