public void ElementStopVisible(GameObject target) { BaseBehavior baseBehaviorComponent = target.GetComponent <BaseBehavior>(); BaseBehavior senderBaseBehavior = gameObject.GetComponentInParent <BaseBehavior>(); baseBehaviorComponent.StopVisible(senderBaseBehavior); // Debug.Log("ElementStopVisible: " + target.name); }