static void DrawCommands(PEPrefabScript prefabScript) { var e = GUI.enabled; GUI.enabled = true; if (GUILayout.Button("Menu", EditorStyles.miniButton)) { var menu = new GenericMenu(); PEUtils.BuildMenu(menu, prefabScript, PrefabUtility.GetPrefabParent(prefabScript.gameObject) == prefabScript.Prefab); menu.ShowAsContext(); } GUI.enabled = e; }