public TerrainImageFactory(TerrainCompletion completionCallback = null) { AllImagesLoaded += completionCallback; _dataFetcher = ScriptableObject.CreateInstance <TerrainImageFetcher>(); _dataFetcher.dataReceived += OnImageReceived; Properties = new ImageryLayerProperties { sourceType = ImagerySourceType.Custom, sourceOptions = new LayerSourceOptions { isActive = true, layerSource = MapboxDefaultImagery.GetParameters(ImagerySourceType.MapboxStreets), Id = "mapbox://styles/jw5514/cjr7loico0my12rnrzcm9qk2p" }, rasterOptions = new ImageryRasterOptions { useCompression = true } }; var tilesCount = ManhattanTileProvider.Tiles.Count; _textures = new Texture2D[tilesCount]; _combineInstances = new CombineInstance[tilesCount]; _textureArray = new Texture2DArray(512, 512, _textures.Length, TextureFormat.RGB24, false); }
public override void SetOptions(LayerProperties options) { _properties = (ImageryLayerProperties)options; }