Can't run Oculus AR because Oculus Settings script is not recognized by Unity

,

I’m trying to test an AR game that was working fine previously, the Unity editor gives me the following errors:

  • Instance of Unity.XR.Oculus.OculusSettings couldn’t be created because there is no script with that name.
  • UnityEditor.EditorApplication:Internal_PlayModeStateChanged (UnityEditor.PlayModeStateChange)*
  • We were unable to create an instance of the requested type Unity.XR.Oculus.OculusSettings. Please make sure that all packages are updated to support this version of XR Plug-In Management. See the Unity documentation for XR Plug-In Management for information on resolving this issue.
  • UnityEditor.EditorApplication:Internal_PlayModeStateChanged (UnityEditor.PlayModeStateChange)*
  • Oculus XR Plugin package Initialization not completed. You will need to create any instances of the loaders and settings manually before you can use the intended XR Plug-in Package.
  • UnityEditor.EditorApplication:Internal_PlayModeStateChanged (UnityEditor.PlayModeStateChange)*

The OculusSettings scriptable object exists in my project, but the inspector is just blank

I have tried reinstalling, re-opening, deleting my library, everything, this problem just keeps coming back. The relevant script is just in my packages without giving any errors

9313334--1304195--upload_2023-9-14_11-31-44.png

Strangely there’s also a second scriptable object with a space “Oculus Settings” where the inspector does work

Usually these sorts of issues can be resolved by deleting and recreating your Oculus Settings ScripableObject, then applying it to your XRGeneralSettingsPerBuildTarget which I believe should be located at Assets/XR/XRGeneralSettings.asset.

I’m not very familiar with the Oculus Plugin package and somewhat confused that you are building an AR app with it, but hopefully that helps! If your problem persists you might want to repost this in the VR forum-- the AR Foundation team primarily moderates this forum.