private void OnVideoFrameResizeInternal(int width, int height) { if (Texture != null && Texture.width == width && Texture.height == height) { return; } if (Texture != null) { WebRTC.DestroyOnMainThread(Texture); Texture = null; } var format = WebRTC.GetSupportedGraphicsFormat(SystemInfo.graphicsDeviceType); Texture = new Texture2D(width, height, format, TextureCreationFlags.None); track.OnVideoFrameResize(Texture); }