public override void OnInspectorGUI() { MainUI mainUI = (MainUI)target; base.OnInspectorGUI(); if (GUILayout.Button("Find Menus")) { mainUI.FindMenus(); } }