Skip to content

Commit

Permalink
Fix for reimport erasing settings
Browse files Browse the repository at this point in the history
A Unity bug occurs when loading resources too quickly that caused steamvr settings to be erased. Thanks for the PR @Peaj #949
  • Loading branch information
zite committed Feb 9, 2023
1 parent 3d7cfc0 commit 008f74a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Assets/SteamVR/Input/Editor/SteamVR_CopyExampleInputFiles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ public class SteamVR_CopyExampleInputFiles : Editor

[UnityEditor.Callbacks.DidReloadScripts]
private static void OnReloadScripts()
{
EditorApplication.update += Update;
}

private static void Update()
{
EditorApplication.update -= Update;
SteamVR_Input.CheckOldLocation();
CopyFiles();
}
Expand Down

0 comments on commit 008f74a

Please sign in to comment.