Example #1
0
    public static OutDebug Init()
    {
        lock (_lock)
        {
            if (Instance == null)
            {
                GameObject outDebug = GameObject.Find("OutDebug");
                if (outDebug == null)
                {
                    outDebug = new GameObject("OutDebug");
                    GameObject.DontDestroyOnLoad(outDebug);
                    Instance = outDebug.AddComponent <OutDebug>();
                }
                else
                {
                    Instance = outDebug.GetComponent <OutDebug>();
                }

                mCurrThreadId = Thread.CurrentThread.ManagedThreadId;
            }

            return(Instance);
        }
    }
Example #2
0
 protected override void OnAwake()
 {
     base.OnAwake();
     OutDebug.Init();
 }