private void FixedUpdate() { if (Physics.Raycast(ray, out hit)) { bottomNode = hit.collider.gameObject; nodePathManager = bottomNode.GetComponentInParent <NodePathManager>(); NodePathChange = bottomNode.GetComponent <NodePathChange>(); } }
private void Start() { uiPathManager = transform.parent.GetComponentInParent <UIPathManager>(); nodePathManager = uiPathManager.nodePathManager.GetComponent <NodePathManager>(); nodePathChange = nodePathManager.GetComponentInChildren <NodePathChange>(); }