protected virtual void Awake() { CharacterActor = this.GetComponentInBranch <CharacterActor>(); if (CharacterActor != null) { RootController = CharacterActor.GetComponentInChildren <CharacterGraphicsRootController>(); } }
protected virtual void OnValidate() { CharacterActor = this.GetComponentInBranch <CharacterActor>(); if (CharacterActor == null) { Debug.Log("Warning: No CharacterActor component detected in this hierarchy."); } else { RootController = CharacterActor.GetComponentInChildren <CharacterGraphicsRootController>(); } }