private void CleanResources()
 {
     if (_scanController != null)
     {
         _scanController.ScanControllerDone.RemoveListener(OnScanDone);
         _scanController.StopScanning();
         _scanSelectorProxy.Destroy();
     }
     _scanSelectorProxy = null;
 }
        /// <summary>
        /// Creates an instance of <see cref="EnvironmentReconstructionInitializerStep"/> class.
        /// </summary>
        /// <param name="scanSelectorProxy">Accessor to the the environment reconstruction scanning process.</param>
        /// <param name="metaReconstruction">Object that manages the environment reconstruction.</param>
        public EnvironmentReconstructionInitializerStep(IMonoBehaviourProxy <BaseEnvironmentScanController> scanSelectorProxy, IMetaReconstruction metaReconstruction)
        {
            if (scanSelectorProxy == null)
            {
                throw new ArgumentNullException("scanSelectorProxy");
            }

            if (metaReconstruction == null)
            {
                throw new ArgumentNullException("metaReconstruction");
            }

            _metaReconstruction = metaReconstruction;
            _scanSelectorProxy  = scanSelectorProxy;
        }