Skip to content

Commit

Permalink
Add missing tag to emulator behaviour, small refactor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
GotoFinal committed Apr 20, 2020
1 parent b02b427 commit 1a1b92b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
6 changes: 3 additions & 3 deletions Assets/GotoUdon/Editor/ClientManager/PublishAutomation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<VRC.SDK.PublishAutomation>();
Expand Down
2 changes: 1 addition & 1 deletion Assets/GotoUdon/GotoUdonSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<PlayerTemplate> playerTemplates = new List<PlayerTemplate>();
Expand Down
3 changes: 2 additions & 1 deletion Assets/GotoUdon/VRC/VRCEmulator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<RuntimeWorldCreation>();
if (worldCreation != null && worldCreation.pipelineManager != null &&
Expand All @@ -46,6 +46,7 @@ public void Init(GotoUdonSettings settings)

GameObject emulatorObject = new GameObject("GotoUdonEmulator");
emulatorObject.AddComponent<VRCEmulatorBehaviour>();
emulatorObject.tag = "EditorOnly";
foreach (PlayerTemplate template in settings.playerTemplates)
{
SpawnPlayer(settings, template);
Expand Down

0 comments on commit 1a1b92b

Please sign in to comment.