/// <summary> /// Display the button of a Scene Bundle /// </summary> private void DisplaySceneBundleButton(SceneBundle bundle) { GUIContent content = new GUIContent(bundle.name, bundle.Description); if (GUILayout.Button(content, GUILayout.Height(30f))) { EditorEnhancedSceneManager.OpenSceneBundle(bundle); } if (GUILayout.Button("A", GUILayout.Width(20f), GUILayout.Height(30f))) { Selection.activeObject = bundle; EditorGUIUtility.PingObject(bundle); } }
public override void OnInspectorGUI() { serializedObject.Update(); sceneAssetsList.DoLayoutList(); if (hasSimialarReference) { EditorGUILayout.HelpBox("Similar Scene Asset reference, remove ot or it will deleted once you finished editing this object", MessageType.Warning); } if (hasNullReference) { EditorGUILayout.HelpBox("Missing scene asset, cannot generate scene labels correcty. Ensure that each scene asset references aren't null in the Scene Bundle", MessageType.Error); } EditorGUILayout.Separator(); if (sceneLabels.arraySize > 0) { DisplayGeneratedLabelsPannel(); } EditorGUILayout.Space(); EditorGUILayout.PropertyField(description); GUILayout.Space(20f); EditorUtils.BeginColorField(EditorUtils.validColor); if (GUILayout.Button("Open")) { EditorEnhancedSceneManager.OpenSceneBundle(target as SceneBundle); } EditorUtils.EndColorField(); if (GUILayout.Button("Add Opened Scenes")) { AddOpenedScenes(); } serializedObject.ApplyModifiedProperties(); }