cancel
Showing results for 
Search instead for 
Did you mean: 

NullReferenceException from Oculus package

eggyegg
Level 2
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
Level 2
Same error here 😞

RootyB
Level 3
Same here. *shrug*

/edit: Unity 2019.1.11f1. MacOS 10.14.3

mmchickenshack
Level 4
same here, all of a sudden

dlazares
Level 3
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
Level 2
Same happens here. Anybody have a clue to share yet?

hacaro
Level 3
same here.

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

nelab
Level 2
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
Level 2
same issue on a Mac