Class TileImageServiceRoadMask
Downloads RoadMask tiles and deserializes them into textures.
Inherited Members
Namespace: Holoride.ElasticSDK
Assembly: Holoride.ElasticSDK.Library.Runtime.dll
Syntax
[Obfuscation(Exclude = true)]
public class TileImageServiceRoadMask : TileDataService<Texture2D>, ITileDataService<Texture2D>, ITileDataProvider<Texture2D>
Constructors
TileImageServiceRoadMask(TileDataServiceConfiguration)
Declaration
public TileImageServiceRoadMask(TileDataServiceConfiguration configuration)
Parameters
Type | Name | Description |
---|---|---|
TileDataServiceConfiguration | configuration |
Fields
Resolution
The resolution of each tile image.
Declaration
public const int Resolution = 256
Field Value
Type | Description |
---|---|
int |
Methods
Deserialize(byte[], out Texture2D)
Defines how the downloaded data is deserialized.
Declaration
protected override bool Deserialize(byte[] data, out Texture2D result)
Parameters
Type | Name | Description |
---|---|---|
byte[] | data | The downloaded data. |
Texture2D | result | The deserialized object. |
Returns
Type | Description |
---|---|
bool | Whether the object was deserialized successfully. |
Overrides
Holoride.ElasticSDK.TileDataService<UnityEngine.Texture2D>.Deserialize(byte[], out UnityEngine.Texture2D)
GetFileName(int, Vector2Int)
Gets the dedicated download fileName for the specific service.
Declaration
protected override string GetFileName(int zoomLevel, Vector2Int tilePos)
Parameters
Type | Name | Description |
---|---|---|
int | zoomLevel | The zoom level the tile position refers to. |
Vector2Int | tilePos | The global position index with respect to the chosen zoom level. |
Returns
Type | Description |
---|---|
string | The file name. |
Overrides
Holoride.ElasticSDK.TileDataService<UnityEngine.Texture2D>.GetFileName(int, UnityEngine.Vector2Int)
GetWebRequest(int, Vector2Int, CancellationToken)
Gets the dedicated download URL for the specific service.
Declaration
protected override UniTask<Func<UnityWebRequest>> GetWebRequest(int zoomLevel, Vector2Int tilePos, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int | zoomLevel | The zoom level the tile position refers to. |
Vector2Int | tilePos | The global position index with respect to the chosen zoom level. |
CancellationToken | cancellationToken | The token to monitor for cancellation requests. |
Returns
Type | Description |
---|---|
Cysharp.Threading.Tasks.UniTask<T><Func<UnityWebRequest>> | The request string to download the tile. |
Overrides
Holoride.ElasticSDK.TileDataService<UnityEngine.Texture2D>.GetWebRequest(int, UnityEngine.Vector2Int, System.Threading.CancellationToken)