Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Video [Solved] VideoPlayer going black on video clip switch

Discussion in 'Audio & Video' started by Red_Dragon69, Apr 15, 2019.

  1. Red_Dragon69

    Red_Dragon69

    Joined:
    Sep 7, 2015
    Posts:
    54
    Hi there :)

    I am attempting to switch between a series of mp4 movies with a simple 2D interface with VideoPlayer. I am running into the issue that, when switching video clips, I get several black frames. I understand that I have to wait for the next movie to load, when the content is prepared. Is there a way to avoid the player going black during the transition/preparation?

    Best regards :)
     
  2. jocyf

    jocyf

    Joined:
    Jan 30, 2007
    Posts:
    236
    Try having different videoplayers with their VideoClips already "Prepared()" so you can switch betwen them (Stop() and Disabling the current one and enabling & Play() the next one)
     
    Red_Dragon69 likes this.
  3. Red_Dragon69

    Red_Dragon69

    Joined:
    Sep 7, 2015
    Posts:
    54
    Thx @jocyf that did the trick :)
     
    jocyf likes this.