コード例 #1
0
ファイル: TimersManager.cs プロジェクト: denx-jp/Hinata
        void Awake()
        {
            if (m_instance != null)
            {
#if UNITY_EDITOR
                Debug.LogWarning("An instance of Timer has already been loaded. Multiple instances are not necessary and will be destroyed.");
#endif
                Destroy(this);
            }

            DontDestroyOnLoad(this);
            DontDestroyOnLoad(gameObject);
            m_instance = this;
        }