private void CompleteStopMrvcCapture() { if (this.captureEngine == null) { return; } // unsubscribe to events this.captureEngine.CaptureStateChanged -= this.OnCaptureStateChanged; DestroyImmediate(this.captureEngine, true); this.captureEngine = null; this.ComponentState = ComponentState.CaptureStopped; }
private void StartMrvcCapture(Connection connection) { if (connection == null) { return; } this.ComponentState = ComponentState.CaptureStarting; if (this.captureEngine == null) { this.captureEngine = this.gameObject.AddComponent <MrvcCapture>(); if (this.captureEngine != null) { this.captureEngine.CaptureStateChanged += this.OnCaptureStateChanged; this.captureEngine.EnableMRC = this.EnableMRC; this.captureEngine.StopOnPaused = this.StopOnPaused; this.captureEngine.Initialize(connection); } } }