Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

NullReferenceException from Oculus package

eggyeggeggyegg Posts: 3
The Oculus package itself raises this error when I try to run my project:
NullReferenceException: Object reference not set to an instance of an object
OculusSampleFrameworkUtil.HandlePlayModeState (UnityEditor.PlayModeStateChange state) (at Assets/Oculus/SampleFramework/Editor/OculusSampleFrameworkUtil.cs:43)
UnityEditor.EditorApplication.Internal_PlayModeStateChanged (UnityEditor.PlayModeStateChange state) (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorApplication.cs:302)
How do I fix this?


  • ldigiuseppeldigiuseppe Posts: 1
    Same error here :(
  • RootyBRootyB Posts: 5 Oculus Start Member
    edited July 2019
    Same here. *shrug*

    /edit: Unity 2019.1.11f1. MacOS 10.14.3
  • mmchickenshackmmchickenshack Posts: 17
    same here, all of a sudden
  • dlazaresdlazares Posts: 3
    same here :(
    Tried re-installing Oculus Integration and Unity. Can't get a blank sample project working anymore. Anyone find a solution?

    Unity 2019.2.1f1
    MacOS 10.13.6
    Oculus Integration 1.39
  • tsquesttsquest Posts: 1
    Same happens here. Anybody have a clue to share yet?
  • hacarohacaro Posts: 7 Oculus Start Member
    same here.
  • SoluisDevTeamSoluisDevTeam Posts: 4
    Having this same issue after upgrading Unity and Oculus package to latest. Did anyone ever find a solution?
  • nelabnelab Posts: 1
    edited December 2019
    I got the same error when I tried to test on PC.
    In my case, the process "Build and Run" on Oculus Quest works well.

    So as a first aid ( not fundamental solution), I comment out
    "[InitializeOnLoadAttribute]" in the OculusSampleFrameworkUtil.cs during testing on PC every time.
    It works well.
  • dixkindixkin Posts: 1
    same issue on a Mac
Sign In or Register to comment.