Skip to content
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

Unable to reference Valve.VR Namespace outside of SteamVR folder #707

Closed
The-Beekeeper opened this issue May 2, 2020 · 13 comments
Closed
Labels
Unity issue An issue that unity needs to fix

Comments

@The-Beekeeper
Copy link

The-Beekeeper commented May 2, 2020

Hello, it seems that for whatever reason I am unable to reference the Valve.VR class when the script lies outside of the SteamVR folder within Visual Studio 2017. But only within unity 2019.3.12f1, when I import my project into unity 2018.4.22f1 it works perfectly fine and I can reference the class whenever and wherever. I've been at a loss for a solution, and I would greatly appreciate any and all assistance. And as far as I can see it should work within Unity 2019.3, please correct me if I am wrong.

I am using SteamVR plugin version 2.5.0

Update: I updated to unity 2020.1.0b7 beta and installed the OpenVR plugin made for unity's new XR plugin system along with the SteamVR 2.6 beta. And now all my problems have disappeared, still have no idea why I had this problem in the first place.

Using unity 2019.3 within the SteamVR/InteractionSystem/Sample folder.
image

Using unity 2019.3 in a scripts folder outside of the SteamVR folder.
image

Using unity 2018.4 in a scripts folder outside the SteamVR folder.
image

@The-Beekeeper The-Beekeeper changed the title Visual studio 2017 unable to reference Valve.VR class outside of SteamVR folder in unity 2019.3 Visual studio 2017 unable to reference Valve.VR Namespace outside of SteamVR folder in unity 2019.3 May 3, 2020
@zite
Copy link
Collaborator

zite commented May 4, 2020

Yeah, strangely this is a Unity 2019.3.12 bug. It works fine in 2019.3.11. I'd recommend downgrading or waiting for a fix as 2020+ is still in beta/alpha. https://unity3d.com/get-unity/download/archive

@zite zite closed this as completed May 4, 2020
@zite zite added the Unity issue An issue that unity needs to fix label May 4, 2020
@zite zite pinned this issue May 4, 2020
@zite zite changed the title Visual studio 2017 unable to reference Valve.VR Namespace outside of SteamVR folder in unity 2019.3 Unable to reference Valve.VR Namespace outside of SteamVR folder Apr 28, 2021
@Hamza-Falih
Copy link

Hamza-Falih commented Jul 12, 2022

Hello everyone,

First of all, I'm sorry to reply on this issue and not create a new one.

It's just that I happen to have the same problem even though I'm using the 2021.3.1f1 Unity version. I get this error when I try to Build and Run for Android.

Does anyone know how to solve or troubleshoot this problem ?

Thanks in advance.

Have a good day !

@mariannapizzo97
Copy link

Hi @Hamza-Falih,
did you solved your problem in Building? How did you maneged to solve it?

Thanks in advance,
Have a good day!

@codeling
Copy link

codeling commented Jun 19, 2023

@Hamza-Falih @mariannapizzo97 did you manage to fix / work around this problem? Or only through changing the Unity version? I seem to have similar problems as @Hamza-Falih (also seeing these errors when trying to build for Android), using 2019.2.21f1 (stuck with that version for the moment, since the project I'm working on has been initially written in that version, and I'm not familiar enough with all the changes since to migrate to a later Unity version).

@Hamza-Falih
Copy link

Hello @mariannapizzo97 and @codeling,

Unfortunately, I wasn't able to solve this problem after all because, as @codeling mentionned, I was also stuck with that Unity version since the project I was working on was originally written in that version. Since last time, someone took over the project in my place and they were able to find a turnaround to fix the problem apparently. Maybe they updated to a newer Unity version and installed newer versions of OpenVR plugin and SteamVR as the original poster said.

I hope you will be able to solve your problem.

I will try to be available in case you need further help.

Good luck and have a nice day !

PS : Sorry @mariannapizzo97 for this late reply.

@rodaraknia
Copy link

This bug has occurred for me on Unity 2021.3.4f LTS

@rodaraknia
Copy link

This is a bug for Unity 2022.3.7f1

@rodaraknia
Copy link

For multiple versions of Unity including 2019, 2020,2021,2022,2023 you can't build except if you use PC and build an .exe
This works fine with SteamVR but not for Android apk distribution. I am going to have to get rid of SteamVR and use Unity VR toolkit instead. I guess that was the plane by Unity?! :(

@mariannapizzo
Copy link

Hello @rodaraknia,

we opened an issue and they fairly told us that you can't build an apk using SteamVR. So yes, you have to do it unfortunately.

@Hamza-Falih
Copy link

Thank you for this feedback @rodaraknia and @mariannapizzo !

@mxw-meta
Copy link

mxw-meta commented Feb 7, 2024

I'm having the same issue using Unity 2022.3.12f1 and couldn't get it sorted out so far.

//e: Ok, nevermind. I got it fixed by revisiting the assembly definition of my project and adding "SteamVR" instead of "Valve.VR". I made a wrong assumption there.

@bismahAbdullah
Copy link

I'm having the same issue using Unity 2022.3.12f1 and couldn't get it sorted out so far.

//e: Ok, nevermind. I got it fixed by revisiting the assembly definition of my project and adding "SteamVR" instead of "Valve.VR". I made a wrong assumption there.

please can you tell how to fix this issue i am using Valve.VR but its not importing

@partellang
Copy link

Just wasted an hour on this before I remembered I had an actual interactable valve object in the game and a Valve.cs that just needed to be renamed haha.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Unity issue An issue that unity needs to fix
Projects
None yet
Development

No branches or pull requests

10 participants