protected void Update() { if (!_currVideoStreamFilter.Equals(_videoStreamFilter)) { ResetTexture(_videoStreamFilter); } if (f.WaitOne(0)) { try { if (data != null) { texture.LoadRawTextureData(data); } } catch { OnStopStreaming(); Debug.LogError("Error loading texture data, check texture and stream formats"); throw; } texture.Apply(); if (!bound) { textureBinding.Invoke(texture); bound = true; } } }
protected void Update() { if (!_videoStreamFilter.Equals(_currVideoStreamFilter)) { ResetMesh(_videoStreamFilter); } if (e.WaitOne(0)) { uvmap.LoadRawTextureData(frameData, frameSize); uvmap.Apply(); mesh.vertices = vertices; mesh.UploadMeshData(false); } }