Skip to content

Commit 14f239f

Browse files
Merge pull request #451 from Unity-Technologies/bugfixes/schoen/test-fix
Fix tests
2 parents d43614e + 61d9885 commit 14f239f

2 files changed

Lines changed: 18 additions & 15 deletions

File tree

Editor/ProxyFeedbackEditor.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System;
1+
#if UNITY_2017_2_OR_NEWER
2+
using System;
23
using System.Collections.Generic;
34
using UnityEditor.Experimental.EditorVR.Modules;
45
using UnityEditor.Experimental.EditorVR.Proxies;
@@ -141,3 +142,4 @@ void SaveData()
141142
}
142143
}
143144
}
145+
#endif

Scripts/Core/Contexts/EditingContextManager.cs

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -144,20 +144,6 @@ static void OnPlayModeStateChanged(PlayModeStateChange stateChange)
144144
}
145145
}
146146

147-
void Awake()
148-
{
149-
s_DefaultContext = m_DefaultContext;
150-
151-
var availableContexts = GetAvailableEditingContexts();
152-
m_ContextNames = availableContexts.Select(c => c.name).ToArray();
153-
154-
if (s_AvailableContexts.Count == 0)
155-
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");
156-
157-
if (s_AvailableContexts.Count > 1)
158-
VRView.afterOnGUI += OnVRViewGUI;
159-
}
160-
161147
void OnEnable()
162148
{
163149
ISetEditingContextMethods.getAvailableEditingContexts = GetAvailableEditingContexts;
@@ -201,6 +187,21 @@ void OnDisable()
201187
}
202188
#endif
203189

190+
191+
void Awake()
192+
{
193+
s_DefaultContext = m_DefaultContext;
194+
195+
var availableContexts = GetAvailableEditingContexts();
196+
m_ContextNames = availableContexts.Select(c => c.name).ToArray();
197+
198+
if (s_AvailableContexts.Count == 0)
199+
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");
200+
201+
if (s_AvailableContexts.Count > 1)
202+
VRView.afterOnGUI += OnVRViewGUI;
203+
}
204+
204205
void OnVRViewGUI(VRView view)
205206
{
206207
var position = view.position;

0 commit comments

Comments
 (0)