Exemplo n.º 1
0
        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));
            }
        }
Exemplo n.º 2
0
        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));
            }
        }
Exemplo n.º 3
0
        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;
        }
Exemplo n.º 4
0
        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;
        }