Add editor to change scenes quickly
This commit is contained in:
8
Assets/Scripts/Components.meta
Normal file
8
Assets/Scripts/Components.meta
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5884e15555abbc341ab6bdb85052e227
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
8
Assets/Scripts/Editor.meta
Normal file
8
Assets/Scripts/Editor.meta
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3d5125322b763cd4684223a7506e82c8
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
36
Assets/Scripts/Editor/OdinButtons.cs
Normal file
36
Assets/Scripts/Editor/OdinButtons.cs
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
[ButtonGroup]
|
||||||
|
private void ForgeScene()
|
||||||
|
{
|
||||||
|
LoadScene("Assets/Scenes/Forge.unity");
|
||||||
|
}
|
||||||
|
|
||||||
|
[ButtonGroup]
|
||||||
|
private void HurricaneExample()
|
||||||
|
{
|
||||||
|
LoadScene("Assets/HurricaneVR/TechDemo/Scenes/scene_examples.unity");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadScene(string path)
|
||||||
|
{
|
||||||
|
if (EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo())
|
||||||
|
{
|
||||||
|
EditorSceneManager.OpenScene(path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Scripts/Editor/OdinButtons.cs.meta
Normal file
11
Assets/Scripts/Editor/OdinButtons.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9c9a2d1cddf226745a2ab540ecc6d107
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -812,7 +812,7 @@ PlayerSettings:
|
|||||||
webGLMemoryGeometricGrowthCap: 96
|
webGLMemoryGeometricGrowthCap: 96
|
||||||
webGLPowerPreference: 2
|
webGLPowerPreference: 2
|
||||||
scriptingDefineSymbols:
|
scriptingDefineSymbols:
|
||||||
Android: USE_INPUT_SYSTEM_POSE_CONTROL;USE_STICK_CONTROL_THUMBSTICKS;ULTIMATEXR_USE_OCULUS_SDK
|
Android: USE_INPUT_SYSTEM_POSE_CONTROL;USE_STICK_CONTROL_THUMBSTICKS;ULTIMATEXR_USE_OCULUS_SDK;ODIN_INSPECTOR;ODIN_INSPECTOR_3;ODIN_INSPECTOR_3_1;ODIN_INSPECTOR_3_2;ODIN_INSPECTOR_3_3
|
||||||
EmbeddedLinux: ULTIMATEXR_USE_OCULUS_SDK
|
EmbeddedLinux: ULTIMATEXR_USE_OCULUS_SDK
|
||||||
GameCoreScarlett: ULTIMATEXR_USE_OCULUS_SDK
|
GameCoreScarlett: ULTIMATEXR_USE_OCULUS_SDK
|
||||||
GameCoreXboxOne: ULTIMATEXR_USE_OCULUS_SDK
|
GameCoreXboxOne: ULTIMATEXR_USE_OCULUS_SDK
|
||||||
|
|||||||
Reference in New Issue
Block a user