Skip to content

Commit 8ac2774

Browse files
added asserts for focus and gaze provider.
1 parent 8a22845 commit 8ac2774

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Assets/MixedRealityToolkit/InputSystem/Focus/FocusProvider.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,9 @@ private void Awake()
228228

229229
private void Start()
230230
{
231+
Debug.Assert(MixedRealityManager.IsInitialized, "No Mixed Reality Manager found in the scene. Be sure to run the Mixed Reality Configuration.");
232+
Debug.Assert(InputSystem != null, "No Input System found, Did you set it up in your configuration profile?");
233+
231234
// Register the FocusProvider as a global listener to get input events.
232235
InputSystem.Register(gameObject);
233236
}

Assets/MixedRealityToolkit/InputSystem/Gaze/GazeProvider.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,9 @@ protected virtual void OnEnable()
208208

209209
private void Start()
210210
{
211+
Debug.Assert(MixedRealityManager.IsInitialized, "No Mixed Reality Manager found in the scene. Be sure to run the Mixed Reality Configuration.");
212+
Debug.Assert(InputSystem != null, "No Input System found, Did you set it up in your configuration profile?");
213+
211214
if (cursorPrefab != null)
212215
{
213216
var cursorObj = Instantiate(cursorPrefab, transform);

0 commit comments

Comments
 (0)