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); }
public void Dismiss(bool animated = true) => _animatedViewInterface.Hide(animated);