Home > OS >  Is there any way to stop/pause the Update() call of Unity in UWP?
Is there any way to stop/pause the Update() call of Unity in UWP?

Time:09-24

I am trying to find a way to pause the execution of Unity's update() call because after stopping and deinitializing OpenXR it completes the execution of the Update() method once and then I cannot restart it back again.

CodePudding user response:

You could just add an if statement to the start of every Update() you want to pause, and check for some variable that you use to indicate if it's paused or not

CodePudding user response:

I have found a solution by using AutoResetEvent. I just use "event.WaitOne();" at the line I want to wait. Then call "event.Set();" at another thread when i want to move on.

  • Related