Skip to content

Commit

Permalink
Properly cleanup controller gameobjects in OnDestroy
Browse files Browse the repository at this point in the history
  • Loading branch information
keveleigh committed Nov 21, 2018
1 parent e59ff5a commit b80ff70
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ protected override void OnDestroy()
InteractionManager.InteractionSourceDetected -= InteractionManager_InteractionSourceDetected;
InteractionManager.InteractionSourceLost -= InteractionManager_InteractionSourceLost;
Application.onBeforeRender -= Application_onBeforeRender;

foreach (MotionControllerInfo controllerInfo in controllerDictionary.Values)
{
Destroy(controllerInfo.ControllerParent);
}
#endif
}

Expand Down

0 comments on commit b80ff70

Please sign in to comment.