Beispiel #1
0
        protected virtual void Awake()
        {
            EventDelegate.Add(window.onShowBegin, OnShowBegin);
            EventDelegate.Add(window.onShowBegun, OnShowBegun);
            EventDelegate.Add(window.onShowEnd, OnShowEnd);
            EventDelegate.Add(window.onHideBegin, OnHideBegin);
            EventDelegate.Add(window.onHideEnd, OnHideEnd);
#if UNITY_EDITOR
            window.ui.SetActive(false); // PopupBaseBuildProcessor
#endif

            if (screenCover == null)
            {
                foreach (ScreenStretch s in GetComponentsInChildren <ScreenStretch>(true))
                {
                    if (s.IsCoveringFullScreen())
                    {
                        screenCover = s;
                        break;
                    }
                }
            }
            ReleasablePool.Register(this);
        }
Beispiel #2
0
 protected virtual void OnDestroy()
 {
     ReleasablePool.Deregister(this);
 }