There seem to be a bug in PlayMaker 1.7.7:
If you have a serializable class that contains an Array:
[Serializable]
public class TestA
{
public int[] testArray = new int[0];
}
and use that inside a PlayMaker action:
public class MyAction : FsmAction
{
public TestA myTestParameters = new TestA();
}
The PlayMaker editor will get confused when trying to serialize that (it'll start happening only after you change the size of the array in the editor:
ArgumentException: Object type int[] cannot be converted to target type: TestA
Parameter name: val
System.Reflection.MonoField.SetValue (System.Object obj, System.Object val, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Reflection/MonoField.cs:133)
System.Reflection.FieldInfo.SetValue (System.Object obj, System.Object value) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Reflection/FieldInfo.cs:150)
HutongGames.PlayMakerEditor.ActionEditor.UpdateArrays ()
HutongGames.PlayMakerEditor.ActionEditor.Update ()
HutongGames.PlayMakerEditor.StateInspector.Update ()
HutongGames.PlayMakerEditor.InspectorPanel.Update ()
HutongGames.PlayMakerEditor.FsmEditor.Update ()
FsmEditorWindow.Update () (at Assets/PlayMaker/Editor/FsmEditorWindow.cs:611)
Is there a known workaround or a fix underway?
Thanks