-
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
Importing a project in Unity 2020.3 causes SteamVR_Settings to reset #949
Comments
Thanks for finding this and reporting. That is definitely not what we would expect. I'm going to label this as a unity bug with a workaround as I believe it does not repro on other major versions. I believe we support moving that file, so I'm not sure doing a load at path is the best plan for the plugin to implement, but is certainly valid on a case by case basis. |
I reproduced the same issue with Unity 2019.4.28f1 LTS and it happens to me in a many other Unity versions as well. Here is a repo with the repro case: https://github.com/Peaj/SteamVRBug This is a major issue. Especially since it leads to resetting "autoEnableVR" to its default value of 1 which in turn leads to a change in the ProjectSettings. It breaks CI pipelines and means you have to tell everyone to discard their changes after cloning the project. |
Test workaround proposed here: ValveSoftware/steamvr_unity_plugin#949
I also tested the workaround proposed by @viliusnbg: https://github.com/Peaj/SteamVRBug/tree/workaround |
As Resource.Load fails and returns null during asset import SteamVR_Settings.instance cannot be called from DidReloadScripts Fixes ValveSoftware#949
Hi,
If you have a project that uses SteamVR and you try to import it with Unity 2020.3, the SteamVR_Settings get reset.
A simple usecase where this matters is cloning the project onto a new machine from github. When you clone the project, it needs to be imported into unity and it needs to generate the library folder and all the related settings.
At the end of the import, SteamVR_Settings.instance will be called. This will trigger LoadInstance() which calls Resources.Load("SteamVR_Settings"). Normally, this would load the existing settings, but for whatever reason during project import this will not load anything and return null. Then the default settings will be generated instead and the actual settings file will be overwritten.
This is a big issue as it also happens when automating unity builds, causing a misconfigured build, making automation impossible.
This might be a Unity bug on an intentional behaviour of Resouces.Load(). Regardless there is a workaround:
Adding this snippet of code in the SteamVR_Settings.LoadInstance() allows steamvr to still load everything during project import.
Hope this issue can be fixed/worked around in the plugin itself.
The text was updated successfully, but these errors were encountered: