Hi,
So Playmaker doesn't seem to persist an object of a custom class!?
I have a custom action called UpdateState:
[System.Serializable]
public class PEChangeState
{
public string name;
public bool change;
public bool active;
}
namespace HutongGames.PlayMaker.Actions
{
[ActionCategory(ActionCategory.Animation)]
[Tooltip("")]
public class PEUpdateState : FsmStateAction
{
[RequiredField]
[Tooltip("Key asset to update states for")]
public PEKeyAsset keyAsset = null;
public PEChangeState newState = new PEChangeState();
}
}
I then have a Custom Action Editor, 'ChangeStateEditor', that creates a PEChangeState and displays it in the inspector. The variables exposed (name, change, active) can then be set. However, the state of these variables do not persist between game plays or even editor window close/open (it looks like the newState object is being cleared). It only seems that built-in classes are persisted?
Am I missing something here? Also, newState will eventually become a List of PEChangeStates. Will other problems arise from this?
Thanks, Jake