Search Unity

Video Setting VideoPlayer.Time directly takes a frame to update

Discussion in 'Audio & Video' started by boehmz1990, Aug 22, 2017.

  1. boehmz1990

    boehmz1990

    Joined:
    Feb 2, 2017
    Posts:
    3
    I have a project where I skip to different video times somewhat frequently. I have noticed when setting the videoPlayer.time field to a new time, it will often stay on the current frame for one frame then the video will update to the new time.
    Is there a function call to refresh the videoPlayer to the new desired immediately before the next render occurs?
    I have confirmed this in debugging my project.
    The setup: I have the video paused at a frame, then in any Monobehavior's update function I skip to a different time on key press. I put a breakpoint inside the if (Input.GetKeyDown) statement, then after it gets triggered put a breakpoint in the general update function. When the next update() occurs, the video is at the same frame and it will not change to the new time until the next update(), meaning the video took a frame to change to the new frame.
     
  2. 137yc

    137yc

    Joined:
    Apr 20, 2016
    Posts:
    1
    hi, I meet the same question. Have you solved?