Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
marko_rkm's avatar
marko_rkm
Honored Guest
7 years ago

Virtual Reality SDK Oculus failed to initialize.

Hello, as you have seen in the title I'm having problems to Initialize the Oculus Rift SDK in Unity. I'm working in an app for samsung Gear VR.
the versions I'm using are these:
  • Unity 2017.3.1f1 
  • ovr_unity_utilities_1.24.0
  • OVRPlatformSDK_v1.24.0
  • ovr_avatar_sdk_1.24.0
I'm following the instructions marked in this guide : https://developer.oculus.com/documentation/platform/latest/concepts/pgsg-unity-gsg/

When I put play in my game the following messages appear in my console:
-Virtual Reality SDK Oculus failed to initialize.
Attempting to enable None instead.
-Unity v2017.3.1f1, Oculus Utilities v1.24.0, OVRPlugin v1.24.0, SDK v0.0.0.
UnityEngine.Debug:Log(Object)
OVRManager:Awake() (at Assets/OVR/Scripts/OVRManager.cs:904)



The first one appears as a warning and the second one appears as a message. Also, I've put the 'Gear VR App Id' number in the 'OculusPlatformSettings' and these errors still appearing.

I've made every step from 'Create an App' to 'Configuring Your App for Local Development', but I get stuck in the 'Initialize the SDK and Perform the Entitlement Check' step, basicly that step asked me to create a script for initialize the SDK with my appID but I have no idea how to use it, or if I have to use it.

I created a script like this:

using UnityEngine;
using Oculus.Platform;

public class AppEntitlementCheck: MonoBehaviour {

void Awake ()
{
try
{
Core.AsyncInitialize();
Entitlements.IsUserEntitledToApplication().OnComplete(EntitlementCallback);
}
catch(UnityException e)
{
Debug.LogError("Platform failed to initialize due to exception.");
Debug.LogException(e);
// Immediately quit the application.
UnityEngine.Application.Quit();
}
}

void GetEntitlementCallback (Message msg)
{
if (msg.IsError)
{
Debug.LogError("You are NOT entitled to use this app.");
UnityEngine.Application.Quit();
}
else
{
Debug.Log("You are entitled to use this app.");
}
}
}

Could you explain to me why these error still appearing and if there's a solution?

I'll give thanks to everyone who support me in this topic.

:smile:

44 Replies

Replies have been turned off for this discussion