If I add the following to a PlayMaker action:
enum MyEnum { A, B, C }
public MyEnum[] enumValues;
I then get errors when loading the FSM:
Error Loading Action: TestObject : FSM : start : HutongGames.PlayMaker.Actions.MyTestAction : enumValues
Replacements.RemotingServices:CreateClientProxy(Type, String, Object[])
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:LogError(Object)
HutongGames.PlayMaker.ActionData:CreateAction(FsmState, Int32)
HutongGames.PlayMaker.ActionData:LoadActions(FsmState)
HutongGames.PlayMaker.FsmState:LoadActions()
HutongGames.PlayMaker.Fsm:InitData()
HutongGames.PlayMaker.Fsm:Init(MonoBehaviour)
PlayMakerFSM:Init()
PlayMakerFSM:Awake()
System.InvalidCastException: Unable to cast object of type 'TestEnum' to type 'Int32'.
at System.Array.SetValueImpl (System.Object value, Int32 pos) [0x00000] in <filename unknown>:0
at System.Array.SetValue (System.Object value, Int32 index) [0x00000] in <filename unknown>:0
at HutongGames.PlayMaker.ActionData.LoadArrayElement (System.Array field, System.Type fieldType, Int32 elementIndex, Int32 paramIndex) [0x00000] in <filename unknown>:0
at HutongGames.PlayMaker.ActionData.LoadActionField (System.Object obj, System.Reflection.FieldInfo field, Int32 paramIndex) [0x00000] in <filename unknown>:0
at HutongGames.PlayMaker.ActionData.CreateAction (HutongGames.PlayMaker.FsmState state, Int32 actionIndex) [0x00000] in <filename unknown>:0
at HutongGames.PlayMaker.ActionData.LoadActions (HutongGames.PlayMaker.FsmState state) [0x00000] in <filename unknown>:0
at HutongGames.PlayMaker.FsmState.LoadActions () [0x00000] in <filename unknown>:0
at HutongGames.PlayMaker.Fsm.InitData () [0x00000] in <filename unknown>:0
at HutongGames.PlayMaker.Fsm.Init (UnityEngine.MonoBehaviour component) [0x00000] in <filename unknown>:0
at PlayMakerFSM.Init () [0x00000] in <filename unknown>:0
at PlayMakerFSM.Awake () [0x00000] in <filename unknown>:0
at Replacements.RemotingServices.CreateClientProxy (System.Type objectType, System.String url, System.Object[] activationAttributes) [0x00000] in <filename unknown>:0
Replacements.RemotingServices:CreateClientProxy(Type, String, Object[])
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:LogError(Object)
HutongGames.PlayMaker.ActionData:CreateAction(FsmState, Int32)
HutongGames.PlayMaker.ActionData:LoadActions(FsmState)
HutongGames.PlayMaker.FsmState:LoadActions()
HutongGames.PlayMaker.Fsm:InitData()
HutongGames.PlayMaker.Fsm:Init(MonoBehaviour)
PlayMakerFSM:Init()
PlayMakerFSM:Awake()
Replacements.RemotingServices:CreateClientProxy(Type, String, Object[])
Thoughts? This goes away if I disable IL2CPP.