public override void OnInspectorGUI() { DrawDefaultInspector(); InfoPanel infoPanelScript = (InfoPanel)target; if (GUILayout.Button("Set home position")) { infoPanelScript.Flip(false); } else if (GUILayout.Button("Set flipped position")) { infoPanelScript.Flip(true); } }