Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

Playing large video files in Gear VR in Unity project

I'm creating a Gear VR android app that plays a large 30 minute video. I have read that I should not use the StreamingAssets folder, but I don't see any information about what I should be using instead. If I put the video in Assets/videos it is not included in the android build. Should I be using the resources folder or is there another way to include the video? (My project is also on iOS, but I'm currently not having any problems on that platform.) I have read that the PersistentDataPath folder can be used, but I don't know how to get my video into that folder when from unity. I don't want to copy the video there and have two 600mb files when only one is used.

Comments

  • oculus_gaboroculus_gabor Posts: 40 Oculus Staff
    Gear VR supports 1 expansion file, up to 4GB. We have some documentation in the works on it. For now, this page will get you started: https://docs.unity3d.com/Manual/android-OBBsupport.html

    You have to adhere to androids naming convention of:
    main.<version>.<package>.obb
    So for example, if your app package name is com.sample.app and this is V1 of your app, the extension file would be
    main.1.com.sample.app.obb
    You can't upload the extension files with the web interface, you'll have to use the command line tools from here https://developer.oculus.com/blog/faster-build-uploads-with-cli/

    The command to upload will look something like this:
    ovr-platform-util upload-gear-build --app_id <app id> --app_secret <secret> --apk <apk path> --obb <external data file path> --channel alpha --notes "Uploading apk and external data"
  • robertogeekrobertogeek Posts: 18
    NerveGear
    Gear VR supports 1 expansion file, up to 4GB. We have some documentation in the works on it. For now, this page will get you started: https://docs.unity3d.com/Manual/android-OBBsupport.html

    You have to adhere to androids naming convention of:
    main.<version>.<package>.obb
    So for example, if your app package name is com.sample.app and this is V1 of your app, the extension file would be
    main.1.com.sample.app.obb
    You can't upload the extension files with the web interface, you'll have to use the command line tools from here https://developer.oculus.com/blog/faster-build-uploads-with-cli/

    The command to upload will look something like this:
    ovr-platform-util upload-gear-build --app_id <app id> --app_secret <secret> --apk <apk path> --obb <external data file path> --channel alpha --notes "Uploading apk and external data"
    Hi @oculus_gabor
    How could we create an obb bigger than 2 GB with Unity? Thanks!
  • oculus_gaboroculus_gabor Posts: 40 Oculus Staff
    That's a question for Unity. Bit of a black box. 
  • robertogeekrobertogeek Posts: 18
    NerveGear
    That's a question for Unity. Bit of a black box. 
    Thanks for your response @oculus_gabor , but we think that it could be related with Unity (of course), but also and perhaps more important, with Android and its APK Expansion Extension File System.
    We have openend a thread here: https://forums.oculusvr.com/developer/discussion/60070/big-up-to-4gb-expansion-file-support-how.
    Please, could you help us with that? Many thanks!
  • karusuyen34karusuyen34 Posts: 2
    NerveGear
    I want to develop an oculus go application using Unity Game Engine. I want to use my VR videos via internal path because VR videos size are so high. In fact, i want to use oculus go internal file path for open my video in my application. How can i access my videos filepath using unity app?
Sign In or Register to comment.