public void Start() { _iTweenPath = PathController.GetComponent <iTweenPath>(); _pathControllerComponent = PathController.GetComponent <PathControllerComponent>(); waypoints = _iTweenPath.nodes.ToArray(); transform.position = waypoints[0]; }
public override void OnInspectorGUI() { DrawDefaultInspector(); PathControllerComponent myScript = (PathControllerComponent)target; if (GUILayout.Button("refreshPath")) { myScript.RefreshPath(); } if (GUILayout.Button("AddCheckPoint")) { myScript.AddCheckPoint(); } }