add ui pack
This commit is contained in:
@@ -5,6 +5,8 @@ using UnityEditor.SceneManagement;
|
||||
using Sirenix.OdinInspector;
|
||||
using Sirenix.OdinInspector.Editor;
|
||||
using Newtonsoft.Json.Bson;
|
||||
using UnityEngine;
|
||||
using Unity.Netcode;
|
||||
|
||||
public class OdinButtons : OdinEditorWindow
|
||||
{
|
||||
@@ -14,30 +16,58 @@ public class OdinButtons : OdinEditorWindow
|
||||
GetWindow<OdinButtons>().Show();
|
||||
}
|
||||
|
||||
[Button]
|
||||
private void LobbyScene()
|
||||
[BoxGroup("Editor")]
|
||||
[ResponsiveButtonGroup("Editor/Group")]
|
||||
private void Lobby()
|
||||
{
|
||||
LoadScene("Assets/Scenes/Lobby.unity");
|
||||
}
|
||||
|
||||
[Button]
|
||||
private void EntranceScene()
|
||||
[ResponsiveButtonGroup("Editor/Group")]
|
||||
private void Entrance()
|
||||
{
|
||||
LoadScene("Assets/Scenes/Entrance.unity");
|
||||
}
|
||||
|
||||
[Button]
|
||||
private void ForgeScene()
|
||||
[ResponsiveButtonGroup("Editor/Group")]
|
||||
private void Forge()
|
||||
{
|
||||
LoadScene("Assets/Scenes/Forge.unity");
|
||||
}
|
||||
|
||||
[Button]
|
||||
private void HurricaneExample()
|
||||
[ResponsiveButtonGroup("Editor/Group")]
|
||||
private void Example()
|
||||
{
|
||||
LoadScene("Assets/HurricaneVR/TechDemo/Scenes/scene_examples.unity");
|
||||
}
|
||||
|
||||
[BoxGroup("Ingame switch scene")]
|
||||
[ResponsiveButtonGroup("Ingame switch scene/Group"), Button("Lobby")]
|
||||
private void LobbyIngame()
|
||||
{
|
||||
GameObject.Find("SceneManager").GetComponent<SceneManager>().SwitchToLobbyLevel();
|
||||
}
|
||||
|
||||
[ResponsiveButtonGroup("Ingame switch scene/Group"), Button("Entrance")]
|
||||
private void EntranceIngame()
|
||||
{
|
||||
GameObject.Find("SceneManager").GetComponent<SceneManager>().SwitchToEntranceLevel();
|
||||
}
|
||||
|
||||
[ResponsiveButtonGroup("Ingame switch scene/Group"), Button("Forge")]
|
||||
private void ForgeIngame()
|
||||
{
|
||||
GameObject.Find("SceneManager").GetComponent<SceneManager>().SwitchToForgeLevel();
|
||||
}
|
||||
|
||||
[Title("Control network")]
|
||||
[Button]
|
||||
private void StartStopHost()
|
||||
{
|
||||
|
||||
GameObject.Find("NetworkManager").GetComponent<NetworkManager>().StartHost();
|
||||
}
|
||||
|
||||
private void LoadScene(string path)
|
||||
{
|
||||
if (EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo())
|
||||
|
||||
Reference in New Issue
Block a user