Пример #1
0
        void OnDestroy()
        {
            if (_camTexMat != null)
            {
                _camTexMat.release();
            }
            if (_tempTransferTexture)
            {
                Destroy(_tempTransferTexture);
            }
            if (_chessCornersImageMat != null)
            {
                _chessCornersImageMat.release();
            }
            if (_previewMaterial)
            {
                Destroy(_previewMaterial);
            }
            if (_arTexture)
            {
                _arTexture.Release();
            }
            if (_chessPatternTexture)
            {
                _chessPatternTexture.Release();
            }
            if (_patternRenderMaterial)
            {
                Destroy(_patternRenderMaterial);
            }
            if (_extrinsicsCalibrator != null)
            {
                _extrinsicsCalibrator.Release();
            }
            if (_undistortMap1 != null)
            {
                _undistortMap1.release();
            }
            if (_undistortMap2 != null)
            {
                _undistortMap2.release();
            }

            Reset();
        }
Пример #2
0
 void OnDestroy()
 {
     if (_camTexMat != null)
     {
         _camTexMat.release();
     }
     if (_camTexGrayMat != null)
     {
         _camTexGrayMat.release();
     }
     if (_camTexGrayUndistortMat != null)
     {
         _camTexGrayUndistortMat.release();
     }
     if (_camTexGrayUndistortInvMat != null)
     {
         _camTexGrayUndistortInvMat.release();
     }
     if (_sensorMat != null)
     {
         _sensorMat.release();
     }
     if (_distortionCoeffsMat != null)
     {
         _distortionCoeffsMat.release();
     }
     if (_noDistCoeffs != null)
     {
         _noDistCoeffs.release();
     }
     if (_arTexture)
     {
         _arTexture.Release();
     }
     if (_previewMaterial)
     {
         Destroy(_previewMaterial);
     }
     if (_chessPatternTransform)
     {
         Destroy(_chessPatternTransform.gameObject);
     }
     if (_chessPatternTexture)
     {
         _chessPatternTexture.Release();
     }
     if (_circlePatternTexture)
     {
         _chessPatternTexture.Release();
     }
     if (_projectorIntrinsicsCalibrator != null)
     {
         _projectorIntrinsicsCalibrator.Clear();
     }
     if (_cameraExtrinsicsCalibrator != null)
     {
         _cameraExtrinsicsCalibrator.Release();
     }
     if (_screenBorderMaterial != null)
     {
         Destroy(_screenBorderMaterial);
     }
     if (_undistortMap1 != null)
     {
         _undistortMap1.release();
     }
     if (_undistortMap2 != null)
     {
         _undistortMap2.release();
     }
 }