public void DeleteInstance() { if (go != null) { Debug.Log(String.Format("KramaxPluginReload.PluginClass.DeleteInstance {0} being destroyed.", Name)); UnityEngine.GameObject.DestroyImmediate(go); go = null; instance = null; fired = false; alive = false; } else { Debug.Log(String.Format("KramaxPluginReload.PluginClass.DeleteInstance object {0} is not alive.", Name)); } }
public void DeleteInstance() { if (go != null) { Debug.Log(String.Format("KramaxPluginReload.PluginClass.DeleteInstance {0} being destroyed.", Name)); UnityEngine.GameObject.DestroyImmediate(go); go = null; instance = null; fired = false; alive = false; } else { Debug.Log(String.Format("KramaxPluginReload.PluginClass.DeleteInstance object {0} is not alive.", Name)); } }
public void CreateInstance() { if (go != null || instance != null) { Debug.LogError(String.Format("KramaxPluginReload.PluginClass.CreateInstance object {0} already alive.", Name)); return; } Debug.Log(String.Format("KramaxPluginReload.PluginClass.CreateInstance create object {0}.", Name)); go = new GameObject(type.Name); instance = go.AddComponent(type) as KramaxReloadExtensions.ReloadableMonoBehaviour; instance.typeMapping = typeMapping; fired = true; alive = true; }
public void CreateInstance() { if (go != null || instance != null) { Debug.LogError(String.Format("KramaxPluginReload.PluginClass.CreateInstance object {0} already alive.", Name)); return; } Debug.Log(String.Format("KramaxPluginReload.PluginClass.CreateInstance create object {0}.", Name)); go = new GameObject(type.Name); instance = go.AddComponent(type) as KramaxReloadExtensions.ReloadableMonoBehaviour; instance.typeMapping = typeMapping; fired = true; alive = true; }