/// <summary> /// Callback called by a MonoPersistentInitializer to load a MonoPersistent object /// </summary> /// <param name="uniqueName">the unique id of the MonoPersistent</param> /// <param name="obj">the related Monopersistent</param> public static void LoadMonoPersistent(string uniqueName, MonoPersistent obj) { DataContainer dCon; if (HasData(uniqueName, out dCon)) { if (dCon.m_spawnable) { obj.LoadData(dCon); } else { Destroy(obj.gameObject); } } }