/// <summary> /// Unity callback. /// </summary> protected void Reset() { if (this.ContextHolder == null) { this.ContextHolder = this.GetComponent<ContextHolder>(); } }
protected void Start() { if (this.RootContext == null) { this.RootContext = FindObjectOfType<GameRootContext>(); } if (this.ContextHolder == null) { this.ContextHolder = this.gameObject.GetComponent<ContextHolder>(); } if (this.RootContext != null) { this.ContextHolder.Context = this.RootContext.Weapon; } }