1.8.3: Create new scene will now give the option to create it as single or additive
This commit is contained in:
parent
de2745d68a
commit
305aa13317
|
|
@ -1,6 +1,12 @@
|
|||
# Change Log
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## [1.8.3] - 2023-03-16
|
||||
|
||||
### Changed
|
||||
- Create new scene will now give the option to create it as single or additive
|
||||
|
||||
|
||||
## [1.8.2] - 2023-03-14
|
||||
|
||||
### Added
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
|
@ -183,13 +184,22 @@ namespace Module.NavigationTool.Editor.Toolbar
|
|||
{
|
||||
if (GUI.Button(rect, styles.iconPlusSmall, styles.button))
|
||||
{
|
||||
if (!EditorUtility.DisplayDialog("Create new scene", "Are you sure that you want to create a new scene?", "Yes", "No"))
|
||||
return;
|
||||
try
|
||||
{
|
||||
int selection = EditorUtility.DisplayDialogComplex("Create new scene", "How do you want to add the scene?", "Single", "Additive", "Cancel");
|
||||
|
||||
if (selection == 2)
|
||||
return;
|
||||
|
||||
Scene scene = EditorSceneManager.NewScene(NewSceneSetup.EmptyScene, NewSceneMode.Additive);
|
||||
Scene scene = EditorSceneManager.NewScene(NewSceneSetup.EmptyScene, selection == 0 ? NewSceneMode.Single : NewSceneMode.Additive);
|
||||
|
||||
if (EditorUtility.DisplayDialog("Create new scene", "Save scene to disk?", "Yes", "No"))
|
||||
EditorSceneManager.SaveScene(scene);
|
||||
if (EditorUtility.DisplayDialog("Create new scene", "Save scene to disk?", "Yes", "No"))
|
||||
EditorSceneManager.SaveScene(scene);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
EditorUtility.DisplayDialog("Failed to add scene", e.Message, "Ok");
|
||||
}
|
||||
}
|
||||
|
||||
GUI.Label(rect, LABEL_SCENE_CREATE, styles.labelCenter);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "com.module.navigationtool",
|
||||
"version": "1.8.2",
|
||||
"version": "1.8.3",
|
||||
"displayName": "Module.NavigationTool",
|
||||
"description": "Support for navigation tools, like favorites, history and toolbars",
|
||||
"unity": "2019.2",
|
||||
|
|
|
|||
Loading…
Reference in a new issue