Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Commit

Permalink
added error message when we cannot enter play mode (#712)
Browse files Browse the repository at this point in the history
* added error message when we cannot enter play mode

* updated null check
  • Loading branch information
StephenHodgson committed Dec 15, 2020
1 parent 129955b commit 20379c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Runtime/Services/MixedRealityToolkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,9 @@ void OnPlayModeStateChanged(UnityEditor.PlayModeStateChange playModeState)
IsApplicationQuitting = false;
break;
case UnityEditor.PlayModeStateChange.ExitingEditMode:
if (activeProfile == null)
if (activeProfile.IsNull())
{
Debug.LogError($"{nameof(MixedRealityToolkit)} has no active profile! Exiting playmode...");
UnityEditor.EditorApplication.isPlaying = false;
UnityEditor.Selection.activeObject = Instance;
UnityEditor.EditorApplication.delayCall += () =>
Expand Down

0 comments on commit 20379c6

Please sign in to comment.