コード例 #1
0
        void Awake()
        {
            if (instance == null)
            {
                instance = this;

                m_Notification.SetActive(false);
                m_CreateNotification = m_Notification.GetComponent <CreateNotification>();
            }
            if (instance != this)
            {
                Debug.LogError("There must be only one NotificationManager object in a scene.");
                UnityEngine.Object.DestroyImmediate(this);
                return;
            }
        }
コード例 #2
0
 private void Start()
 {
     m_Notification.SetActive(false);
     m_CreateNotification = m_Notification.GetComponent <CreateNotification>();
 }