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

Fix SteamVR_Settings being overwritten during asset import #974

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Peaj
Copy link

@Peaj Peaj commented Jul 23, 2021

SteamVR_Settings are currently overwritten on each asset (re)import as mentioned in #949.

Calling Resources.Load during asset import always returns null.
SteamVR_Settings.instance is using Resources.Load to load existing settings.
SteamVR_CopyExampleInputFiles is calling SteamVR_Settings.instance from DidReloadScripts callback which is first called during asset import and returns null.
This leads to the SteamVR_Settings asset getting overwritten every time the project is (re)imported as mentioned in #949.

This PR is delaying the call to SteamVR_Settings.instance in SteamVR_CopyExampleInputFiles that happens directly during DidReloadScripts till the editor update loop where it is safe to execute Resources.Load.

Fixes #949

As Resource.Load fails and returns null during asset import SteamVR_Settings.instance cannot be called from DidReloadScripts

Fixes ValveSoftware#949
@zite zite added the Fixed in next release Fix coming in next release label Feb 9, 2023
@zite
Copy link
Collaborator

zite commented Feb 9, 2023

Despite this taking over a year to get in, we appreciate the PR. This fix will be in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in next release Fix coming in next release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Importing a project in Unity 2020.3 causes SteamVR_Settings to reset
2 participants