SteamVR menu button stops coroutines when pressed.
So I've discovered that if I press the Vive's steam menu button while a coroutine is running it will stop the coroutine. This is especially problematic if the coroutine uses WaitForSeconds as whatever is supposed to happen after will never occur. Has anyone else experienced this or found a workaround? I can't just exclude coroutines from my game.
Answer by Strieglitz · Nov 21, 2018 at 03:04 AM
Have you tried turn RunInBackground on ?
+
due to this Post : https://answers.unity.com/questions/802583/coroutine-not-running-after-yield-return-new-waitf.html
Coroutines run with the Timescale in the TimeManager settings. If you open the TimeManager while testing and press the steamvr-home-button the timescale is set to 0. In my case, after continue the test with pressing the steamvr-home-button again the timestep remain 0. this Could be the issue with the Steamvr-home-Menu blocking coroutines. Maby it depends on the steamvr version.
+
if you want to remove this behaviour you can Open The SteamVR_Render.cs and change the line where the TimeStep / timeScale is set SteamVR_Render.cs
if (pauseGameWhenDashboardIsVisible)
{
timeScale = Time.timeScale;
Time.timeScale = 0.0f; // <----------------------change this to 1
}
sceneResolutionScale = SteamVR_Camera.sceneResolutionScale;
SteamVR_Camera.sceneResolutionScale = 0.5f;
to
Answer by Chimer0s · Mar 10, 2020 at 04:19 AM
I'm almost certain this is the correct answer. Somehow I never got notified of your response and happened across this information on my own quite a bit later lol. Thanks for putting this in writing for those still looking though. :)
Your answer
Follow this Question
Related Questions
Please help me solve the problem with shoot a gun(HTC VIVE) 1 Answer
Trying to use the Gear VR touchpad as a play/pause input 1 Answer
Steam VR controllers becoming hidden after steam button pressed 1 Answer
Grab and Throw Script changes velocity without reason 0 Answers
HTC Vive Pro crashes Unity, Steam VR reads "(unresponsive) Unity.exe" 0 Answers