I use video tutorials in .mp4 format. The opening screen video plays fine. The video in-game causes my app to crash out back to the home screen. Logcat reports no error message. I’ve used video playback in this situation in a much earlier build without problems, so I’ve no idea what’s causing it. Print statements show it’s the line
videoplayer.Play()
that causes the crash.
Okay, found it’s because I’m tweening the scale in for a nice transition. I wonder if Unity have changed the way the video player is optimised because this used to work.
Knowing what version of Unity you’re running is always helpful as we are constantly improving the video player.
2017.4.0f1
It was a result of tweening from a start size of (0.001,0.001). When I upped that to 0.01,0.01, it worked. If I were to hazard a guess, an initialisation size check found the surface too small to be visible so the object creation was aborted to save wasted processing?