public Vector3 CalculateElevatorUseNeed(OffMeshLink link) { Vector3 result = Vector3.zero; Elevator.MeshLinkDetector detect = link.gameObject.GetComponent <Elevator.MeshLinkDetector>(); if (detect != null) { result = detect.transform.position; } return(result); }
public bool ElevatorOnPath(OffMeshLink link) { Elevator.MeshLinkDetector check = null; if (link != null) { check = link.GetComponent <Elevator.MeshLinkDetector>(); } else { Debug.Log(link); } if (check != null) { return(true); } return(false); }