public override void OnInspectorGUI() { EnemyPath myScript = (EnemyPath)target; if (GUILayout.Button("Add Waypoint")) { myScript.AddWayPoint(); } DrawDefaultInspector(); }