Class TileTextureManager
The base class of a TileTextureManager holds all important information about the tiles that should get downloaded. Resulting from the zoom level and the tile position it creates the correct key to download the correct tile.
Inherited Members
Namespace: Holoride.ElasticSDK
Assembly: Holoride.ElasticSDK.Library.Runtime.dll
Syntax
public class TileTextureManager : TileDataManager<Texture2D>
Constructors
TileTextureManager(int, float, ITileDataProvider<Texture2D>)
The base constructor of a TileDataManager.
Declaration
public TileTextureManager(int zoomLevel, float extents, ITileDataProvider<Texture2D> tileDataProvider)
Parameters
Type | Name | Description |
---|---|---|
int | zoomLevel | The zoom level. |
float | extents | The extents of the area in which tiles should be kept in memory. |
ITileDataProvider<Texture2D> | tileDataProvider | The tile data provider. |
Methods
FillTextureArrayAsync(TileAreaDescription, Texture2DArray, int, IProgress<float>, CancellationToken)
Loads all required textures and fills a texture array.
Declaration
public UniTask FillTextureArrayAsync(TileAreaDescription tileAreaDescription, Texture2DArray textureArray, int copiedTexturesPerFrame = 5, IProgress<float> onProgressUpdate = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
TileAreaDescription | tileAreaDescription | The tile array. |
Texture2DArray | textureArray | The texture array. |
int | copiedTexturesPerFrame | The number of textures to be copied per frame. |
IProgress<float> | onProgressUpdate | Called with relative progress in [0, 1]. |
CancellationToken | cancellationToken | The token to monitor for cancellation requests. |
Returns
Type | Description |
---|---|
Cysharp.Threading.Tasks.UniTask |