Skip to content

Commit

Permalink
Merge pull request #451 from Unity-Technologies/bugfixes/schoen/test-fix
Browse files Browse the repository at this point in the history
Fix tests
  • Loading branch information
mtschoen-unity authored Dec 11, 2017
2 parents d43614e + 61d9885 commit 14f239f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
4 changes: 3 additions & 1 deletion Editor/ProxyFeedbackEditor.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
#if UNITY_2017_2_OR_NEWER
using System;
using System.Collections.Generic;
using UnityEditor.Experimental.EditorVR.Modules;
using UnityEditor.Experimental.EditorVR.Proxies;
Expand Down Expand Up @@ -141,3 +142,4 @@ void SaveData()
}
}
}
#endif
29 changes: 15 additions & 14 deletions Scripts/Core/Contexts/EditingContextManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,20 +144,6 @@ static void OnPlayModeStateChanged(PlayModeStateChange stateChange)
}
}

void Awake()
{
s_DefaultContext = m_DefaultContext;

var availableContexts = GetAvailableEditingContexts();
m_ContextNames = availableContexts.Select(c => c.name).ToArray();

if (s_AvailableContexts.Count == 0)
throw new Exception("You can't start EditorXR without at least one context. Try re-importing the package or use version control to restore the default context asset");

if (s_AvailableContexts.Count > 1)
VRView.afterOnGUI += OnVRViewGUI;
}

void OnEnable()
{
ISetEditingContextMethods.getAvailableEditingContexts = GetAvailableEditingContexts;
Expand Down Expand Up @@ -201,6 +187,21 @@ void OnDisable()
}
#endif


void Awake()
{
s_DefaultContext = m_DefaultContext;

var availableContexts = GetAvailableEditingContexts();
m_ContextNames = availableContexts.Select(c => c.name).ToArray();

if (s_AvailableContexts.Count == 0)
throw new Exception("You can't start EditorXR without at least one context. Try re-importing the package or use version control to restore the default context asset");

if (s_AvailableContexts.Count > 1)
VRView.afterOnGUI += OnVRViewGUI;
}

void OnVRViewGUI(VRView view)
{
var position = view.position;
Expand Down

0 comments on commit 14f239f

Please sign in to comment.