Forum Discussion
viewport
7 years agoProtege
Why can't I Initialise Oculus on Gear VR
I am trying to perform an entitlement check.
Nothing at all runs in the script after the Oculus.Platform.Core.AsyncInitialize(); not even update.
I have tried on a version downloaded from the store in the Release Channel.
No errors are caught.
Running on Gear VR doesn't.
The script works fine on PC.
using System.Collections;
Nothing at all runs in the script after the Oculus.Platform.Core.AsyncInitialize(); not even update.
I have tried on a version downloaded from the store in the Release Channel.
No errors are caught.
Running on Gear VR doesn't.
The script works fine on PC.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Oculus.Platform;
public class OculusEntitlmentCheck : MonoBehaviour
{
public TextMesh debugText;
public TextMesh debugText2;
void Awake()
{
debugText.text = "entitlementCheckScriptAwake";
if (OculusDeviceToggle.isRunningOnOculus)
{
debugText.text = "checking entitlment";
try
{
debugText.text = "initializing oculus 1";
Oculus.Platform.Core.AsyncInitialize();
debugText.text = "initializing oculus 2";
Entitlements.IsUserEntitledToApplication().OnComplete(GetEntitlmentCallback);
debugText.text = "initializing oculus 3";
}
catch (UnityException e)
{
debugText.text = "oculus initialisation failed";
Debug.LogException(e);
Quit();
}
}
}
void GetEntitlmentCallback(Message msg)
{
if(msg.IsError)
{
Debug.LogError("You are NOT entitled to use this app.");
Quit();
}
else
{
debugText.text = "you are entitled to this app";
}
}
void Quit()
{
debugText.text = "Quit function running";
UnityEngine.Application.Quit();
}
}
1 Reply
Replies have been turned off for this discussion
- juanoldinhoHeroic ExplorerHi @viewport,
Where did you get the Platform SDK, was it from our site, or with the Oculus Integration from the Unity Asset Store?
I believe the problem is you are missing libovrplatformloader.so in your built project. Can you look in your project under Assets->Plugins->Android->libs->armeabi-v7a for libovrplatformloader.so?
If you don't have the library, can you try re-importing the Platform SDK and look to see if it is importing the platformloader. I am attaching a screenshot of the import.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 1 year ago
- 4 years ago
- 3 years ago
- 4 months ago