Пример #1
0
        protected virtual void Awake()
        {
            Transform thisTransform = transform;

            if (thisTransform.childCount == 0)
            {
                Debug.LogError($"{this} MUST have 1 child view GameObject. ViewController's transform path: {gameObject.GetFullPath()}");
                return;
            }

            view = thisTransform.GetChild(0).GetComponent <View>();
            _animatedViewInterface = view as IAnimatedView;
            if (_animatedViewInterface != null)
            {
                _animatedViewInterface.SetViewController(this);
            }

            ViewDidLoad();

            if (_visibleWhenFirstLoaded || _animatedViewInterface == null)
            {
                return;
            }

            _animatedViewInterface.Hide(false);
        }
Пример #2
0
 public void Dismiss(bool animated = true) => _animatedViewInterface.Hide(animated);