Skip to content

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
@keithbradner keithbradner added the Fixed in next release Fix coming in next release label Feb 9, 2023
@keithbradner
Copy link
Collaborator

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