public override void OnInspectorGUI() { base.OnInspectorGUI(); MovingPlatform myScript = (MovingPlatform)target; if (GUILayout.Button("Set Start")) { myScript.SetStart(); } if (GUILayout.Button("Set End")) { myScript.SetEnd(); } if (GUILayout.Button("Go To Start")) { myScript.GoToStart(); } if (GUILayout.Button("Go To End")) { myScript.GoToEnd(); } if (GUILayout.Button("Randomize Init")) { myScript.RandomInitOffset(); } }