cancel
Showing results for 
Search instead for 
Did you mean: 

NullReferenceException from Oculus package

eggyegg
Honored Guest
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?
13 REPLIES 13

ldigiuseppe
Honored Guest
Same error here 😞

RootyB
Explorer
Same here. *shrug*

/edit: Unity 2019.1.11f1. MacOS 10.14.3

mmchickenshack
Protege
same here, all of a sudden

Anonymous
Not applicable
same here 😞
Tried re-installing Oculus Integration and Unity. Can't get a blank sample project working anymore. Anyone find a solution?

Versions:
Unity 2019.2.1f1
MacOS 10.13.6
Oculus Integration 1.39

tsquest
Honored Guest
Same happens here. Anybody have a clue to share yet?

hacaro
Explorer
same here.

SoluisDevTeam
Explorer
Having this same issue after upgrading Unity and Oculus package to latest. Did anyone ever find a solution?

Anonymous
Not applicable
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.

dixkin
Honored Guest
same issue on a Mac