From 1a1b92b46095c5d4eebc6765d2eb7e152e205d4b Mon Sep 17 00:00:00 2001 From: GotoFinal Date: Mon, 20 Apr 2020 12:11:17 +0200 Subject: [PATCH] Add missing tag to emulator behaviour, small refactor fixes --- Assets/GotoUdon/Editor/ClientManager/ClientManagerEditor.cs | 2 +- Assets/GotoUdon/Editor/ClientManager/PublishAutomation.cs | 6 +++--- Assets/GotoUdon/GotoUdonSettings.cs | 2 +- Assets/GotoUdon/VRC/VRCEmulator.cs | 3 ++- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Assets/GotoUdon/Editor/ClientManager/ClientManagerEditor.cs b/Assets/GotoUdon/Editor/ClientManager/ClientManagerEditor.cs index 5caca01..434be18 100644 --- a/Assets/GotoUdon/Editor/ClientManager/ClientManagerEditor.cs +++ b/Assets/GotoUdon/Editor/ClientManager/ClientManagerEditor.cs @@ -103,7 +103,7 @@ private void PublishAndTest() private void StartPublishing() { - GotoUdonSettings.Instance.EnableAutomaticPublish = true; + GotoUdonSettings.Instance.enableAutomaticPublish = true; EditorUtility.SetDirty(GotoUdonSettings.Instance); EnvConfig.ConfigurePlayerSettings(); VRC_SdkBuilder.PreBuildBehaviourPackaging(); diff --git a/Assets/GotoUdon/Editor/ClientManager/PublishAutomation.cs b/Assets/GotoUdon/Editor/ClientManager/PublishAutomation.cs index 8077b75..8dab9f7 100644 --- a/Assets/GotoUdon/Editor/ClientManager/PublishAutomation.cs +++ b/Assets/GotoUdon/Editor/ClientManager/PublishAutomation.cs @@ -16,15 +16,15 @@ private static void OnModeChange(PlayModeStateChange state) { if (state != PlayModeStateChange.EnteredPlayMode) { - if (state != PlayModeStateChange.ExitingPlayMode || !GotoUdonSettings.Instance.EnableAutomaticPublish) return; - GotoUdonSettings.Instance.EnableAutomaticPublish = false; + if (state != PlayModeStateChange.ExitingPlayMode || !GotoUdonSettings.Instance.enableAutomaticPublish) return; + GotoUdonSettings.Instance.enableAutomaticPublish = false; EditorUtility.SetDirty(GotoUdonSettings.Instance); AssetDatabase.SaveAssets(); ClientManagerEditor.Instance.StartClients(); return; } - if (!GotoUdonSettings.Instance.EnableAutomaticPublish) return; + if (!GotoUdonSettings.Instance.enableAutomaticPublish) return; GameObject gameObject = new GameObject("GotoUdonAutomation"); gameObject.tag = "EditorOnly"; gameObject.AddComponent(); diff --git a/Assets/GotoUdon/GotoUdonSettings.cs b/Assets/GotoUdon/GotoUdonSettings.cs index 1d2bf00..9b009a7 100644 --- a/Assets/GotoUdon/GotoUdonSettings.cs +++ b/Assets/GotoUdon/GotoUdonSettings.cs @@ -9,7 +9,7 @@ public class GotoUdonSettings : ScriptableObject // singleton because can't delay udon and we need to be ready to create emulator at any point public static GotoUdonSettings Instance; - public bool EnableAutomaticPublish; + public bool enableAutomaticPublish; public GameObject avatarPrefab; public Transform spawnPoint; public List playerTemplates = new List(); diff --git a/Assets/GotoUdon/VRC/VRCEmulator.cs b/Assets/GotoUdon/VRC/VRCEmulator.cs index 7e9de6f..c444852 100644 --- a/Assets/GotoUdon/VRC/VRCEmulator.cs +++ b/Assets/GotoUdon/VRC/VRCEmulator.cs @@ -37,7 +37,7 @@ public bool IsNetworkSettled public void Init(GotoUdonSettings settings) { - if (GotoUdonSettings.Instance.EnableAutomaticPublish) return; + if (GotoUdonSettings.Instance.enableAutomaticPublish) return; #if UNITY_EDITOR RuntimeWorldCreation worldCreation = Object.FindObjectOfType(); if (worldCreation != null && worldCreation.pipelineManager != null && @@ -46,6 +46,7 @@ public void Init(GotoUdonSettings settings) GameObject emulatorObject = new GameObject("GotoUdonEmulator"); emulatorObject.AddComponent(); + emulatorObject.tag = "EditorOnly"; foreach (PlayerTemplate template in settings.playerTemplates) { SpawnPlayer(settings, template);