Search Unity

Bug WebGL bug: videoplayer applies the video to everything as a glitch

Discussion in 'Audio & Video' started by Studio7_Prod, Mar 10, 2023.

  1. Studio7_Prod

    Studio7_Prod

    Joined:
    Feb 1, 2023
    Posts:
    1
    Hello!

    I have this very strange bug. I have a cube game object that is my TV screen and it is using a videoplayer with an URL to play the video. So when the TV is clicked, the material changes and the video plays. It used to be a material override. It is working fine but because of the glitch, I tried switching to a Render Texture instead thinking it would solve my problem but it doesn't. Also, it only happens once it is built, not while playing it inside unity.

    What happens basically is that when I turn the TV on, and then I go click on another object that is a trigger in my scene, the video from the TV plays and is applied to everything everywhere. On top of the normal material. And it comes and goes as my character is looking around or walking.

    I can't seem to find anyone online that has had this issue before.

    please help me.

    You can see a screen record of the bug here:
    WebglVideoGlitch.mp4

    Unity 2019.4.40f1
     
    Last edited: Mar 10, 2023
  2. The_Island

    The_Island

    Unity Technologies

    Joined:
    Jun 1, 2021
    Posts:
    502
    It is a pretty weird bug, not going to lie. I asked around, and my coworker never saw this. Is it possible you are sharing the same material or doing GPU instancing? I would try and play around with the material to see if there is a setting that fixes it. 2019.4 is not supported anymore, but if you can upgrade the project to a supported one and reproduce the issue, you can report it as a bug so we can investigate.
     
  3. aitoraglaya

    aitoraglaya

    Joined:
    Apr 5, 2022
    Posts:
    2
    I had the very same issue on multiple versions of Unity, on multiple WebGL projects, having the videos both locally and streaming them to a render texture. I solved it when I changed in the project settings the Color Space to "Linear", turned off "Auto Graphics" and changed the Graphics APIs to "WebGL 2" only. I don't know which of these changes solved it tbh

    One of the weirdest and wildest bugs I've encountered in Unity.