EDIT: I noticed the problem is not in the “setMaterial” part, but in the “pause” and “play” parts. See the UPDATE part below for more info. Because of this, I’m changing the title as well.
So, I’m developing for Gear VR. Basically I have a TV screen playing a video with a MediaPlayer, and 3 buttons in front of it. Clicking one of the buttons have to switch between 3 videos.
I’m a newbie with Unreal Engine, so I don’t know if there is a better way to do this, anyway this is what I came up with:
Basically I have 3 materials with 3 different MediaPlayers. Each time the user clicks one of the buttons, I pause all the players, then I change the material of the tv screen, and then I start the associated media player.
Also, The Level Blueprint ensures that when I BeginPlay the video number 1 is played automatically.
This BP is working as expected when I play it in the Viewport Editor, but when I package and install it in GearVR, only movie number one works correctly (the one that is played at begin). If I try to switch to movie 2 or 3, I get a black screen; If I switch back to movie 1, it works correctly. I can see the prints, so the functions are called.
I suppose it is all due to [Gear VR limitations][2], but I cannot understand what is the problem there. All the materials are quite standards (a MediaPlayer texture connected to Base Color and Emissive joints with an Opaque Blend Mode).
UPDATE: I tried removing the “play” part in the blueprint, and stopping the flow after the three “pauses”.
The pause part works in the editor: the video pauses, and of course the material is not changed and the new video is not started.
But when I tried to pack it and install on Gear VR… the pause part didn’t work anymore.
So, what actually happened before is that the mediaplayer is NOT pausing, the setMaterial IS actually setting a new material, and the new video is NOT starting. So I get a black screen.
So… my question is now: why the “pause” and “play” parts are not working on GearVR, while they work in the editor?