Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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

Discussion in 'AR' started by WARdd, Sep 14, 2023.

  1. WARdd

    WARdd

    Joined:
    Aug 10, 2015
    Posts:
    29
    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

    upload_2023-9-14_11-28-37.png

    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

    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

    upload_2023-9-14_11-32-57.png
     
  2. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    956
    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.