Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Video playback crashes app in one scene, no error

Discussion in 'Android' started by SoftwareGeezers, Oct 7, 2018.

  1. SoftwareGeezers

    SoftwareGeezers

    Joined:
    Jun 22, 2013
    Posts:
    900
    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.
     
    Last edited: Oct 7, 2018
  2. SoftwareGeezers

    SoftwareGeezers

    Joined:
    Jun 22, 2013
    Posts:
    900
    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.
     
  3. Evaldas_Unity

    Evaldas_Unity

    Unity Technologies

    Joined:
    Jun 23, 2016
    Posts:
    69
    Knowing what version of Unity you're running is always helpful as we are constantly improving the video player.
     
  4. SoftwareGeezers

    SoftwareGeezers

    Joined:
    Jun 22, 2013
    Posts:
    900
    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?