49 lines
1.0 KiB
C#
49 lines
1.0 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEditor;
|
|
using UnityEditor.SceneManagement;
|
|
using Sirenix.OdinInspector;
|
|
using Sirenix.OdinInspector.Editor;
|
|
using Newtonsoft.Json.Bson;
|
|
|
|
public class OdinButtons : OdinEditorWindow
|
|
{
|
|
[MenuItem("Tools/Odin Buttons")]
|
|
private static void OpenWindow()
|
|
{
|
|
GetWindow<OdinButtons>().Show();
|
|
}
|
|
|
|
[Button]
|
|
private void LobbyScene()
|
|
{
|
|
LoadScene("Assets/Scenes/Lobby.unity");
|
|
}
|
|
|
|
[Button]
|
|
private void EntranceScene()
|
|
{
|
|
LoadScene("Assets/Scenes/Entrance.unity");
|
|
}
|
|
|
|
[Button]
|
|
private void ForgeScene()
|
|
{
|
|
LoadScene("Assets/Scenes/Forge.unity");
|
|
}
|
|
|
|
[Button]
|
|
private void HurricaneExample()
|
|
{
|
|
LoadScene("Assets/HurricaneVR/TechDemo/Scenes/scene_examples.unity");
|
|
}
|
|
|
|
private void LoadScene(string path)
|
|
{
|
|
if (EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo())
|
|
{
|
|
EditorSceneManager.OpenScene(path);
|
|
}
|
|
}
|
|
}
|