コード例 #1
0
ファイル: GameEnvironment.cs プロジェクト: hyg821/HFFramework
        public void OpenLocalLog(bool b)
        {
            LogCat log = gameObject.GetComponent <LogCat>();

            if (log == null)
            {
                log = gameObject.AddComponent <LogCat>();
            }
            else
            {
                Destroy(log);
                log = null;
            }
        }
コード例 #2
0
        public void OpenLocalLog(bool b)
        {
            IsOpenLoaclLog = b;
            LogCat log = gameObject.GetComponent <LogCat>();

            if (IsOpenLoaclLog == true && log == null)
            {
                log = gameObject.AddComponent <LogCat>();
            }
            else if (log != null && IsOpenLoaclLog == false)
            {
                GameObject.Destroy(log);
                log = null;
            }
        }