void OnRobotDisconnected() { if (_cameraSource != null) { _cameraSource.Close(); _cameraSource = null; } if (_imageProcessor != null) { _imageProcessor.Destroy(); _imageProcessor = null; } for (int i = 0; i < Output.TexturesCount; ++i) { Output.SetTexture(TxEyesOutput.NullTexture, i); } _cameraProfile = ""; _camsInited = false; }
void OnRobotDisconnected() { if (_camRenderer [0] != null) { _camRenderer [0].Disable(); } if (_camRenderer [1] != null) { _camRenderer [1].Disable(); } if (_cameraSource != null) { _cameraSource.Close(); _cameraSource = null; } for (int i = 0; i < _camRenderer.Length; ++i) { if (_camRenderer [i]) { _camRenderer [i].RequestDestroy(); } } for (int i = 0; i < _camRendererParents.Length; ++i) { if (_camRendererParents [i] != null) { GameObject.Destroy(_camRendererParents [i]); _camRendererParents [i] = null; } } _cameraProfile = ""; _camsInited = false; }