Dhruv Narayan Arora
Dhruv Narayan Arora

Reputation: 61

Steam VR Scene stops responding on reload in Unity

I have a scene that I'm working on using Steam VR 2.0, and Unity 2018.3.2f1. I have a simple statement in it that reloads the scene

private void Update()
    {
        if (Input.GetKeyDown(KeyCode.R))
        {
            SceneManager.LoadSceneAsync("Final");
        }
    }

The issue is: when I reload the scene, it stops responding properly. I am still able to move my head around, and hover over objects. And the objects I hover over get highlighted, but they stay highlighted. I'm not able to pick them up, or interact with them in any meaningful way, and I don't know why this is happening.

I've attached a screenshot of the issue below.

As you can see, multiple objects are highlighted, and the hand mesh is weird:

enter image description here

Solutions I've tried--

Any suggestions?

Upvotes: 2

Views: 2549

Answers (1)

Dhruv Narayan Arora
Dhruv Narayan Arora

Reputation: 61

The issue was arising because the Player prefab in SteamVR 2.0 had Do Not Destroy on Load checked. So, there were multiple players being instanced when I reloaded the scene. I unchecked that box, and now everything is in order.

The checkbox is located inside the [SteamVR] object under the Player prefab: The checkbox is located inside the <code>[SteamVR]</code> object under the <code>Player</code> prefab

Upvotes: 4

Related Questions