Sadasy的Unity学习笔记——视频播放组件VideoPlayer的坑

当你重复打开同一个VideoPlayer时,会出现刚打开组件时,该组件绘制上一次打开的片段。

解决方法:清理VideoPlayer的RendererTextuer

 void Clear(RenderTexture targetTexture)
    {
        Graphics.SetRenderTarget(targetTexture);
        GL.PushMatrix();
        GL.Clear(true, true, Color.clear);
        GL.PopMatrix();
    }

内容我也不懂,大佬教我的。就这样。

猜你喜欢

转载自blog.csdn.net/qq_36423720/article/details/106121322
今日推荐