public void init() { Debug.Log ("Root created"); root = ScriptableObject.CreateInstance<SecuenceNode>(); Debug.Log (root); root.init (); DontDestroyOnLoad(this); }
void OnEnable() { if (secuence == null) { Debug.Log ("Secuence created"); secuence = ScriptableObject.CreateInstance<Secuence> (); secuence.init (); DontDestroyOnLoad(secuence); } }