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

Commit

Permalink
Fix profiles reset and services reinitialized when already running (#646
Browse files Browse the repository at this point in the history
)
  • Loading branch information
FejZa committed Jun 19, 2020
1 parent de181b5 commit 9f38fb3
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@ public MixedRealityToolkitRootProfile ActiveProfile
/// <param name="profile"></param>
public void ResetProfile(MixedRealityToolkitRootProfile profile)
{
if (Application.isEditor && Application.isPlaying)
{
// The application is running in editor play mode, can't
// reset profiles in this state as it will cause destruction
// and reinitialization of services in use.
return;
}

if (isResetting)
{
Debug.LogWarning("Already attempting to reset the root profile!");
Expand Down

0 comments on commit 9f38fb3

Please sign in to comment.