Search code examples
unity-game-enginevirtual-realityoculusgear-vr

Oculus Platform Initialize


When I try to initialize the platform:

Oculus.Platform.Core.Initialize();

I get an error:

UnityException: Oculus Platform failed to initialize.

What could be the reason?

Device: GearVR and S8+; Env: Unity v2017.1.1f1, Oculus Utilities v1.19.0, OVRPlugin v1.19.0, SDK v1.1.9.0.


Solution

  • In my case, the problem was with Oculus Runtime.

    To find the problem need to use OculusLogGatherer. This util can gather all logs and perform auto analysis. If u see in auto analysis something like this:

    [Service_2017-11-15_14.59.51.txt] 15/11 14:59:54.088 {!ERROR!} [OAF ERROR] ......\package\PackageManager.cpp(187) : Package does not exist: oculus-runtime (1971015) [Service_2017-11-15_14.59.51.txt] 15/11 14:59:54.103 {!ERROR!} [OAF ERROR] ......\package\PackageManager.cpp(187) : Package does not exist: oculus-runtime (1971015) [Service_2017-11-15_14.59.51.txt] 15/11 15:00:09.078 {!ERROR!} [MobileConfigWrapper] Could not find mobileconfig metadata at C:\Program Files\Oculus\Support\oculus-runtime\mobileconfig\MobileConfigMetadata.json

    This means that you need to install\reinstall a Oculus Runtime.