public ExtentOptions now_cam_by(GameObject zip_is_cam, int i = 0, int u = 2000) { RangeAroundTransformTileProviderOptions zipo = new RangeAroundTransformTileProviderOptions(); zipo.visibleBuffer = i; zipo.disposeBuffer = u; zipo.targetTransform = zip_is_cam.transform; return(zipo); }
public override void OnInitialized() { _rangeTileProviderOptions = (RangeAroundTransformTileProviderOptions)Options; if (_rangeTileProviderOptions.targetTransform == null) { Debug.LogError("TransformTileProvider: No location marker transform specified."); _waitingForTargetTransform = true; } else { _initialized = true; } //_toRemove = new List<UnwrappedTileId>(((_rangeTileProviderOptions.visibleBuffer * 2) + 1) * ((_rangeTileProviderOptions.visibleBuffer * 2) + 1)); _currentExtent.activeTiles = new HashSet <UnwrappedTileId>(); _map.OnInitialized += UpdateTileExtent; _map.OnUpdated += UpdateTileExtent; }
public override void OnInitialized() { if (Options != null) { _rangeTileProviderOptions = (RangeAroundTransformTileProviderOptions)Options; } else if (_rangeTileProviderOptions == null) { _rangeTileProviderOptions = new RangeAroundTransformTileProviderOptions(); } if (_rangeTileProviderOptions.targetTransform == null) { Debug.LogError("TransformTileProvider: No location marker transform specified."); _waitingForTargetTransform = true; } else { _initialized = true; } _currentExtent.activeTiles = new HashSet <UnwrappedTileId>(); _map.OnInitialized += UpdateTileExtent; _map.OnUpdated += UpdateTileExtent; }