Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question VideoPlayer.url how to reset?

Discussion in 'Audio & Video' started by Flavelius, Feb 10, 2021.

  1. Flavelius

    Flavelius

    Joined:
    Jul 8, 2012
    Posts:
    943
    Hi,
    i don't want to keep the url property of the videoplayer set with old content, so i'm trying to reset it after stopping.
    Setting it to null or string.Empty prints an error that the movie [] cannot be played which i'm not trying to do. Even setting videplayer.source to type clip and then setting url to an empty value produces this error.
    Why is it automatically trying to play the url value on property-set when source type is different, the source is empty and the player is stopped?
    This is different to clip type where it doesn't attempt to automatically play a null clip.
    Do i have to set something else too/before?
     
  2. Flavelius

    Flavelius

    Joined:
    Jul 8, 2012
    Posts:
    943