I'm trying to get a basic video player running on the GearVR.
- I'm using Unity 5.4.2f1 - I downloaded the newest Oculus Sample Framework (1.5.0) for Unity. - From the build settings, I removed all of the scenes except "Movie Player" (Is it bad to launch with just this scene?) - I built and ran on my device
When I run it, the audio plays fine, but the video is blank (The movie screen switches from the "HD" logo to a solid light-gray fill).
A few notes/thoughts:
- The minimum API level is 19 (Kit Kat) and Multi-threaded Rendering are turned off (As they were when I opened the project). I assume that's OK? - I tried adding OpenGLES3 to the GraphicsAPI list and set it on top. That didn't help. - My build's texture compression is set to ETC2 (GLES 3.0). Is that OK? - I commented out everyplace where it set: Cursor.visible = false; Cursor.lockState = CursorLockMode.Locked; Because it was annoying me while trying it out in the editor. Is that OK? - When I run it in the editor, the console gives me an error about wwwReader.movie. However, the video still plays fine there. But it looks like the Android code path is completely different, so that's probably just a coincidence, right? - Among the 33(!!!) warnings in my Unity console for this project, this one jumped out at me:
`UnityEngine.GL.IssuePluginEvent(int)' is obsolete: `IssuePluginEvent(eventID) is deprecated. Use IssuePluginEvent(callback, eventID) instead.'
Is it possible that this deprecated GL call is what is causing the texture to remain blank?
Any other ideas on why this might happen? Or how to fix it?
Can anyone confirm that this framework + Unity 4.5.2 + GearVR does work? Or do you see this problem too?
1. I installed Unity 5.3.6.p5 (The docs mention this version) 2. I copied Oculus Sample Framework 1.5.0 into a new directory 3. I opened that project, switched to Android, and built with default settings.
Result: When I open up the Movie Player scene, it acts exactly as it did before. I hear sound but the screen is gray. I clicked the back button, to bring up the UI and paused the video. Pausing it caused the video to show up! I then un-paused and it seemed to play fine.
I tried loading up another scene and then coming back to the Movie Player. Each time I open it, the same thing happens. It starts out broken, but the video becomes active when I pause it.
For my usage, I'm hoping I can work around this issue by pausing and un-pausing the video on load, while it's invisible. Hopefully that will work.
I am still curious what's going on. And it would be nice if someone could try to build the framework and confirm that they're seeing the same problem.