/// <summary>
        /// Sets occlusion config.
        /// </summary>
        /// <param name="value">The value.</param>
        public void SetOcclusionConfig(AROcclusionImageConfig value = null)
        {
            if (value == null)
            {
                _currentConfig = _defaultConfig;
            }
            else
            {
                _currentConfig = value;
            }

            UpdateOcclusionProperties();
        }
        /// <summary>
        /// Awake.
        /// </summary>
        private void Awake()
        {
            Debug.Assert(OcclusionShader != null, "Occlusion Shader parameter must be set.");
            _occlusionMaterial = new Material(OcclusionShader);

            if (config != null)
            {
                _defaultConfig = config;
            }
            else
            {
                _defaultConfig = gameObject.AddComponent(typeof(AROcclusionImageConfig)) as AROcclusionImageConfig;
            }

            _currentConfig = _defaultConfig;
            UpdateOcclusionProperties();

            _camera = GetComponent <Camera>();
            _camera.depthTextureMode |= DepthTextureMode.Depth;

            _commandBuffer = new CommandBuffer {
                name = "Camera texture"
            };
        }