private void RenderAdditivelyLoadedScene() { EditorGUILayout.LabelField(new GUIContent("Additively Loaded Scene Path", "In order to facilitate different modes of play (Multiplayer Client & Server + Singleplayer), a scene is additively loaded to the 'base' scene with the specifics for that mode of play. The path for that scene is found underneath."), EditorStyles.centeredGreyMiniLabel); if (_currentMode == BuildMode.Singleplayer) { EditorGUILayout.BeginHorizontal(); EditorGUI.BeginChangeCheck(); _singleOnlyScene = EditorGUILayout.TextField(new GUIContent("Singleplayer Only Scene:", "The path for the additively loaded scene used for the Singleplayer mode of play."), _singleOnlyScene, EditorStyles.textField); if (EditorGUI.EndChangeCheck()) { BuildScriptPrefs.SetSingleOnlyScene(_singleOnlyScene); } if (GUILayout.Button(new GUIContent("Browse", "Browse for scenes in the Unity project."), EditorStyles.miniButtonRight, GUILayout.Width(EditorGUIUtility.fieldWidth))) { var sceneBrowse = BrowseScene(); if (!string.IsNullOrEmpty(sceneBrowse)) { _singleOnlyScene = sceneBrowse; BuildScriptPrefs.SetSingleOnlyScene(_singleOnlyScene); } GUIUtility.ExitGUI(); } EditorGUILayout.EndHorizontal(); DrawLoadUnloadScene(_singleOnlyScene); } else if (_currentMode == BuildMode.Client) { EditorGUILayout.BeginHorizontal(); EditorGUI.BeginChangeCheck(); _clientOnlyScene = EditorGUILayout.TextField(new GUIContent("Client Only Scene:", "The path for the additively loaded scene used for the Client mode of play."), _clientOnlyScene, EditorStyles.textField); if (EditorGUI.EndChangeCheck()) { BuildScriptPrefs.SetClientOnlyScene(_clientOnlyScene); } if (GUILayout.Button(new GUIContent("Browse", "Browse for scenes in the Unity project."), EditorStyles.miniButtonRight, GUILayout.Width(EditorGUIUtility.fieldWidth))) { var sceneBrowse = BrowseScene(); if (!string.IsNullOrEmpty(sceneBrowse)) { _clientOnlyScene = sceneBrowse; BuildScriptPrefs.SetClientOnlyScene(_clientOnlyScene); } GUIUtility.ExitGUI(); } EditorGUILayout.EndHorizontal(); DrawLoadUnloadScene(_clientOnlyScene); } else if (_currentMode == BuildMode.Server) { EditorGUILayout.BeginHorizontal(); EditorGUI.BeginChangeCheck(); _serverOnlyScene = EditorGUILayout.TextField(new GUIContent("Server Only Scene:", "The path for the additively loaded scene used for the Server mode of play."), _serverOnlyScene, EditorStyles.textField); if (EditorGUI.EndChangeCheck()) { BuildScriptPrefs.SetServerOnlyScene(_serverOnlyScene); } if (GUILayout.Button(new GUIContent("Browse", "Browse for scenes in the Unity project."), EditorStyles.miniButtonRight, GUILayout.Width(EditorGUIUtility.fieldWidth))) { var sceneBrowse = BrowseScene(); if (!string.IsNullOrEmpty(sceneBrowse)) { _serverOnlyScene = sceneBrowse; BuildScriptPrefs.SetServerOnlyScene(_serverOnlyScene); } GUIUtility.ExitGUI(); } EditorGUILayout.EndHorizontal(); DrawLoadUnloadScene(_serverOnlyScene); } }