Hi, I wrote a custom action and realize that changing serialized fields in it can behave differently in respect of where do you add/remove a field.
ALL WHAT FOLLOW IS TRUE IF YOU DON'T UPDATE THE SCENE WHERE YOU USED THE MODIFIED ACTION (Open and save even if in unity the scene is not flagged as modified with the *; saving by Unity command line will not update the scene).
Moreover Playmaker behave differently if you just play in the editor or run a build; for instance in the build you can get errors or something broken, that simply works fine in the editor.
The error is something like:
"Error Loading Action: GameObject: FSM: State: MyAction: myField
Argument is out f range.
Parameter name: index
>UnityEngine.Debug.LogError(Object)
HutonGames.PlayMaker.ActionData.CreateAction(FsmState, Int32)
HutonGames.PlayMaker.ActionData.LoadActions(FsmState)
..."
Here some use case I reproduced.
If you ADD a field before others, you will get an error and following fields will not work.
If you ADD a field as the last public one in your class, you will get an error, but all will work like before (at least if you null check the new field before using it).
If you REMOVE a field before others, you will get NO error and following fields will not work.
If you REMOVE the last public field in your class, you will get NO error but all will work like before.
I guess is a serialization problem, but my question is: could PlayMaker behave in the same way in the editor and in the build, helping people to early find problems?
Thanks