Beispiel #1
0
 protected virtual void Awake()
 {
     CurrentScreen = this;
     _root         = transform;
     if (_root is null)
     {
         throw new NullReferenceException();
     }
     if ((!(_windowRoot is null) || !(_dialogueRoot is null)) && _contentRoot is null)
     {
         throw new NullReferenceException("if you want to use window and dialogue roots you also need to define your content root");
     }
     // filling default transforms for where nothing is defiend and we dont use this feature
     _contentRoot  = _contentRoot ?? _root;
     _windowRoot   = _windowRoot ?? _root;
     _dialogueRoot = _dialogueRoot ?? _root;
 }
Beispiel #2
0
 protected override void OnDestroy()
 {
     base.OnDestroy();
     CurrentScreen = null;
 }