cancel
Showing results for 
Search instead for 
Did you mean: 

Platform SDK Initialization for Gear VR not working

infinite360vr
Explorer
Hi

I am using Unity v 5.4.2f2 with Platform SDK 1.9.0

I followed Oculus developer guide to initialize platform for entitlement, IAP etc. But it is failing in both editor and gear VR.

Here is the process I followed:

1.Download latest platform SDK 1.9.0. unzip the package and import the "OculusPlatform.unitypackage" file in my project.
2. Create a new app in Oculus dashboard. Get App ID from API section and use it in settings under Oculus Platform / Edit Settings menu.
3. Check "use user token" box in settings and paste the token created from dashboard in token field.
4. In a new c# script write this in start method:
Oculus.Platform.Core.Initialize();


Now if I run the project in editor it gives me following error:

DllNotFoundException: LibOVRPlatform64_1
In Gear VR it throws exception from Platform.cs line # 73
if (!IsPlatformInitialized)
{

throw new UnityException("Oculus Platform failed to initialize.");

}
I tried to check for missing dll, I couldn't find the specified dll file (LibOVRPlatform64_1) in my project. This explains the problem in editor. But I don't know whats wrong in Android build.

Has anyone else faced the same problem. How to fix this? 
8 REPLIES 8

brian_jew
Expert Protege
Hi, I want to know some more about your situation as it sounds like you followed the steps correctly.

- Are you on a mac or pc?

- In your second step, which field did you add the app id in the settings?  Also is your app a rift app id or a gear vr app id?

- Where is Oculus installed on your machine?  The dll gets loaded from Oculus location.

- When you say in Gear VR, do you mean you switched the Build settings to Android and ran it in the editor?  Or did you mean you built an apk and ran it on a samsung device that has oculus installed on it?

infinite360vr
Explorer

brian_jew said:

Hi, I want to know some more about your situation as it sounds like you followed the steps correctly.

- Are you on a mac or pc?

- In your second step, which field did you add the app id in the settings?  Also is your app a rift app id or a gear vr app id?

- Where is Oculus installed on your machine?  The dll gets loaded from Oculus location.

- When you say in Gear VR, do you mean you switched the Build settings to Android and ran it in the editor?  Or did you mean you built an apk and ran it on a samsung device that has oculus installed on it?



Hi @brian_jew Thanks for quick response..
- I am using PC windows 10.
- I filled the App ID in Gear VR as my app is a gear VR app in dashboard.
- Oculus is installed in C:\Program Files\Oculus directory.
- I tried to run it in editor with android build settings as well as an APK on Samsung Galaxy S6 with gear VR. I received different errors both time as I stated earlier.

infinite360vr
Explorer
@brian_jew did you find out how to fix this issue

charles_beyer
Protege
infinite360vr, reading through this thread I'm having a hard time understanding what your issue might be.  Would you be willing to try to get one of the Unity Samples in the SDK to run?  For example, OVRPlatformSDK_v1.10.0.zip\Samples\Unity\VrVoiceChat has a Readme.md with some steps to follow.  I've seen a couple of people work through this sample so when you run into an issue I might have more insight on what is blocking you. 

infinite360vr
Explorer
Thanks @charles.beyer
I didn't know that version 1.10 is out. I will sure try it now. I have come confusion regarding process, do I need to have a build uploaded in dashboard to make it work. How do I test/check entitlement in a development build? What should be behaviour of app if entitlement fails?

Thanks

charles_beyer
Protege
AFAIK you do need to upload a build to pass the entitlement check.  Specifically, to pass the entitlement check you need to add the user to the 'Subscribed Users' list for the Channel you upload the build to.  Then the user has to accept the App in their Store under their 'My Preview Apps' section.  I don't know how do all this without uploading a build.  Anyway, it sounds like a lot but you only have to do it once and it makes sense when you consider that entitlement grants follow the flow of someone purchasing your Application.  Or for free Apps, authorizing it to be installed on their device.  Let me know if you have issues!

infinite360vr
Explorer
Thanks a lot for making things clear. 
Here is another one: Which release channel should I use for checking entitlement?

delphinius81
Rising Star
Any release channel will work so long as the account you are logged in with has been added to that channel. For example, you could add "infinite360vr" to Alpha, and then "infinite360vr" will be entitled to the app and all Alpha builds.

The one thing that you have to keep in mind is that if you have a user in multiple release channels, the "my preview apps" will only show you the latest version of the app you are entitled to. So, say you have a user added to both Beta and Alpha. Beta has version 1.1 and Alpha has version 1.2. My Preview Apps will only show you version 1.2. Kind of annoying, but that's how the store is right now. This also means that you can't have a Store version of the app AND a RC/Beta/Alpha version of the app from the same account. 

@"charles.beyer" is that supposed to be intended behavior?