-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SteamVR_Actions broken after Scene reload #616
Comments
Problems even more game breaking. After hours upon hours of testing and ensuring there are even more problems along. I set the Hand GrabGripAction to none, because it breaks the game, I cannot use two buttons to pick things up, because obviously in 99% you need the few buttons for other features or systems. So I only have GrabPinchAction enabled. Every script that uses a SteamVR_Action_Boolean and is set to GrabGrip in the dropdown is now broken. If anyone, anywhere has a dirty fix or anything... I'll take it! |
Sorry you've been having such issues with the plugin. Can you tell me what version of the plugin (top of the readme.txt) and what version of unity you're using? |
Thanks for the example project and detailed repro steps. I attempted to repro using your project but was unable to. When I reloaded the scene by hitting space bar it didn't revert the state of the action. I tried this with Unity 2019.2.0f1. You may be having an issue with multiple player objects in your scene. If you go into the player prefab, SteamVRObjects, then [SteamVR] you'll see a checkbox for if you want to set the player to DoNotDestroy. Which in this case you probably don't. Let me know if this helps. |
Hey zite, The Version of Steam VR is: The Unity Version I tested it on is 2019.2.8f1 running on Target Platform Windows x86_64. VR Headset is a HTC Vive Pro but it's reproducible without any VR devices attached. I just got back to the project to test it with Do Not Destroy disabled, but the bug still occurs. Here are the steps to reproduce if you use my repo (as I didn't mention them precisely):
I hope you are able to find what I mean. I still haven't found a way to setup default buttons in my scripts until now. |
I am also having this (almost) exact issue. On scene reload only haptics are affected. Any script that uses haptics get the same "sourceMap" null error. |
Any updates on this? This issue is broken our project when trying to go to a new scene or just reloading the current one. |
I believe I have this same or a related problem. However, in my case it used to work. The only things I can think of that I have changed since it worked are:
Now when i switch scenes, my hands stop tracking, the default action set claims to be enabled via a check in code, but the Unity UI now shows this: And I can't run anymore because of it until I make a code change that causes Unity to recompile. then I can hit play again. I'm using Unity 2019.3.15f1 and the latest SteamVR plugin, 2.5 |
OK, so after fighting with this for 2 days, I think I have resolved my issues with the following: First, I reverted to a single action set and removed default values in MonoBehaviours for action sets as @Noblauch mentioned, e.g., Next I added my other action sets back in and my hands stopped tracking again after the SECOND scene load (Menu => Game => Menu*), however, the default action set didn't disappear from Unity anymore, so, progress. After more experimentation I found that if I disabled all action sets before loading new scenes then the hands would work after loading. Maybe enabling a previously active action set just doesn't work after scene switching? If this is the expected way to use action sets, it would be nice if disabling all action sets was done by |
I experience a similar problem. After loading a scene a second time as @levilansing pointed out the actions are broken. It is not nesessary to load another scene. Directly reloading the scene already works. Edit: Strange is that the pose of hands is still working and hand pose is adjusting correctly to the different actions. |
I'm having a similar issue. I have a scene using the [CameraRig] prefab and a scene using the Player prefab. When switching from player -> camerarig, my interaction breaks. In the input live view, it looks like this before running: https://i.imgur.com/bXndxF8.png Then after switching scenes: https://i.imgur.com/IvEOjKS.png Then if i close and reopen the live view, I get this in the panel: https://i.imgur.com/QVyV2Fh.png And this spam in the console: https://i.imgur.com/TfLRBsD.png The actions file doesn't actually get changed, unity seems to think it does though. It can be fixed by either regenerating the actions by changing an action and clicking save and generate, or by restarting unity. Edit: Changed over to using a single action set and I'm no longer having any issues. |
I just ran into the same issue, @Noblauch's fix worked for me. This is with SteamVR Unity Plugin - v2.5 (sdk 1.8.19). I have a single action set, which I think lessened some of the problems for me, but I still couldn't track hand position after reloading a scene. @Noblauch should bill Steam for the hours... this asset is a bit of a mess. Still, the following change fixed it for me on SteamVR_Behaviour_Pose.cs line 17:
There's another one in SteamVR_ActivateActionSetOnLoad.cs, but I can get away with not changing that one because I've got a single action set (I think.) Here are my symptom, in case this helps out anyone on Google:
|
I have the same issue on my game. It is not happening when I load my scene a second time but it happens every third time. |
I am having a similar issue #1026 Has anybody been able to figure out how to fix this? |
If you use the SteamVR interaction system in Unity and setup default parameters via
SteamVR_Action_Boolean someAction = SteamVR_Input.GetAction<SteamVR_Action_Boolean>("InteractUI");
the interaction system gets broken if you change the button type in the inspector to something other than the default value and then reload the scene in play mode. The problem persists until you restart Unity.
Use this script to see yourself:
To Reproduce:
Or download this project I set up and just try it out (you can skip step 1 - 8 then)
https://github.com/Noblauch/SteamVR_Interaction_Bug
Expected:
The SteamVR_Input.GetAction<SteamVR_Action_Boolean>("InteractUI") function only gets the defined (bound) button for the specific action and doesn't have the ability to actually change or destroy something.
It took me 2 days and overall ~19 hours at work to even figure out what the hell is going on. I really hope this gets fixed and some poor soul finds this post, so he doesn't need to commit -m "suicide"
My question now would still be how to initialize a button for the inspector because this way is breaking the system. However it's actually exactly done like that in the interaction system example scene.
The text was updated successfully, but these errors were encountered: