06-30-2019 03:17 AM
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)
03-18-2020 06:15 AM
04-11-2020 01:36 PM
08-03-2020 11:40 PM
private const string pluginName = "OVRPlugin";
private static System.Version _versionZero = new System.Version(0, 0, 0);
43: private const string pluginName = "OVRPlugin";
44: private static System.Version _versionZero = new System.Version(0, 0, 0);
45:
46: #if OVRPLUGIN_UNSUPPORTED_PLATFORM
47: public static readonly System.Version wrapperVersion = _versionZero;
48: #else
49: public static readonly System.Version wrapperVersion = OVRP_1_49_0.version;
50: #endif
08-11-2020 07:33 AM
I am working with Unity version 2019.2.5f1 and this solution worked. If you use this solution make sure to put these two lines in OVRPluggin.cs under line 40 that says:
37: // Internal C# wrapper for OVRPlugin.39: public static class OVRPlugin40: {
43: private const string pluginName = "OVRPlugin";44: private static System.Version _versionZero = new System.Version(0, 0, 0);
Also, make sure to delete the other two lines of code that you copied or you will get errors in lines that have "_versionZero"
kndol said:
I fix this problem:
filnd below lines in OVRPlugin.cs:private const string pluginName = "OVRPlugin";
private static System.Version _versionZero = new System.Version(0, 0, 0);
and move them to line 43 (my version is 18.0.0).
43: private const string pluginName = "OVRPlugin";
44: private static System.Version _versionZero = new System.Version(0, 0, 0);
45:
46: #if OVRPLUGIN_UNSUPPORTED_PLATFORM
47: public static readonly System.Version wrapperVersion = _versionZero;
48: #else
49: public static readonly System.Version wrapperVersion = OVRP_1_49_0.version;
50: #endif