UI.Text is lost after enabled when video is playing

I need help with my simple project. (I’m using 2020.3.18f)

  1. ‘Object1’(left object) is always showing, ‘Object2’(right object) is disabled at start, both contain a child object with text component.
  2. ‘RawImageWithVideoPlayer’ has raw image to show video, and also has video player to play video.
  3. ‘Script’ object has below script to control Object2 and video player
using UnityEngine;
using UnityEngine.Video;

public class ScriptForTest : MonoBehaviour
{
    public VideoPlayer videoPlayer;
    public GameObject object2;

    void Start()
    {
        object2.SetActive(false);
        videoPlayer.url = System.IO.Path.Combine(Application.streamingAssetsPath, "testVideo.mp4");
    }

    void Update()
    {
        if (Input.GetKeyDown(KeyCode.K))
        {
            if(videoPlayer.isPlaying)
                videoPlayer.Stop();
            else
                videoPlayer.Play();
        }
        if (Input.GetKeyDown(KeyCode.L))
        {
            object2.SetActive(!object2.activeSelf);
        }
    }
}


4. after build and play my project, there is a problem :
text in Object2 is lost after enabled when video is playing. if video is not playing, text in Object2 shows correctly.

I want to know why this is happens. Is this a bug, or am I doing something wrong?

Hi @

That’s… strange! and definitely shouldn’t be happening!

It would be great if you could submit a bug report for us to take a look at this. I just ran into another post which seems related: WebGL Video Texture Playing on TextMeshPro Font and if we had both bug report we could test this issue easily.