Example #1
0
 void OnDisable()
 {
     if (instance == this)
     {
         instance = null;
     }
 }
Example #2
0
        static void Initialize()
        {
            if(!initialized) {
            if(!Application.isPlaying)
                return;

            initialized = true;

            GameObject go = new GameObject("ThreadScheduler");
            instance = go.AddComponent<ThreadScheduler>();
            }
        }
Example #3
0
        static void Initialize()
        {
            if (!initialized)
            {
                if (!Application.isPlaying)
                {
                    return;
                }

                initialized = true;

                GameObject go = new GameObject("ThreadScheduler");
                instance = go.AddComponent <ThreadScheduler>();
            }
        }
Example #4
0
 void Awake()
 {
     instance    = this;
     initialized = true;
 }
Example #5
0
 void OnDisable()
 {
     if(instance == this) {
     instance = null;
     }
 }
Example #6
0
 void Awake()
 {
     instance = this;
     initialized = true;
 }