public override void OnInitialized()
 {
     _cbtpOptions    = (CameraBoundsTileProviderOptions)Options;
     _groundPlane    = new Plane(Mapbox.Unity.Constants.Math.Vector3Up, Mapbox.Unity.Constants.Math.Vector3Zero);
     _viewportTarget = new Vector3(0.5f, 0.5f, 0);
     _shouldUpdate   = true;
     _cachedTile     = new UnwrappedTileId();
     toRemove        = new List <UnwrappedTileId>();
 }
 public override void OnInitialized()
 {
     _cbtpOptions = (CameraBoundsTileProviderOptions)_options;
     if (_cbtpOptions.camera == null)
     {
         _cbtpOptions.camera = Camera.main;
     }
     _groundPlane  = new Plane(Vector3.up, 0);
     _shouldUpdate = true;
 }
示例#3
0
        public override void SetOptions(ExtentOptions extentOptions)
        {
            CameraBoundsTileProviderOptions options = extentOptions as CameraBoundsTileProviderOptions;

            if (options != null)
            {
                camera        = options.camera;
                visibleBuffer = options.visibleBuffer;
                disposeBuffer = options.disposeBuffer;
            }
            else
            {
                Debug.LogError("ExtentOptions type mismatch : Using " + extentOptions.GetType() + " to set extent of type " + this.GetType());
            }
        }
        public override void OnInitialized()
        {
            _tiles          = new HashSet <UnwrappedTileId>();
            _canonicalTiles = new HashSet <CanonicalTileId>();
            _cbtpOptions    = (CameraBoundsTileProviderOptions)_options;

            if (_cbtpOptions.camera == null)
            {
                _cbtpOptions.camera = Camera.main;
            }
            _cbtpOptions.camera.transform.hasChanged = false;
            _groundPlane  = new Plane(Vector3.up, 0);
            _shouldUpdate = true;
            _currentExtent.activeTiles = new HashSet <UnwrappedTileId>();
        }