Пример #1
0
        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;
            }
        }