Class TileDataCache
Utilities for interacting with the application's tiled data cache.
Namespace: Holoride.ElasticSDK
Assembly: Holoride.ElasticSDK.Runtime.dll
Syntax
public static class TileDataCache
Methods
ClearTileData()
Completely clears the tile data cache for this application.
Declaration
public static void ClearTileData()
PrefetchTileDataAsync(Node, GeoCoordinate, float, params IContextProvider[])
Prefetches resources (e.g. tile data) for a specified area.
It is the callers responsibility to run the returned enumerator as a coroutine.
Declaration
public static UniTask PrefetchTileDataAsync(Node sceneDefinition, GeoCoordinate center, float extents, params IContextProvider[] contextProviders)
Parameters
| Type | Name | Description |
|---|---|---|
| Node | sceneDefinition | The node up to which to gather resources for a graph, typically a ElasticSceneDefinitionNode. |
| GeoCoordinate | center | The center of the area in which to gather resources. |
| float | extents | The extents of the area in which to gather resources. |
| IContextProvider[] | contextProviders | List of context providers required for the evaluated graph, if any. |
Returns
| Type | Description |
|---|---|
| Cysharp.Threading.Tasks.UniTask |
Examples
// Inside some MonoBehaviour:
void OnEnable() {
StartCoroutine(TileDataManager.PrefetchTileData(sceneDefinition, center, extents, GetComponents<IContextProvider>());
// or
StartCoroutine(DoPrefetchAndMore());
}
IEnumerator DoPrefetchAndMore() {
// ...
yield return TileDataManager.PrefetchTileData(sceneDefinition, center, extents, GetComponents<IContextProvider>());
// ...
}
PrefetchTileDataAsync(Node, GeoCoordinate, float, CancellationToken, params IContextProvider[])
Prefetches resources (e.g. tile data) for a specified area.
It is the callers responsibility to run the returned enumerator as a coroutine.
Declaration
public static UniTask PrefetchTileDataAsync(Node sceneDefinition, GeoCoordinate center, float extents, CancellationToken cancellationToken, params IContextProvider[] contextProviders)
Parameters
| Type | Name | Description |
|---|---|---|
| Node | sceneDefinition | The node up to which to gather resources for a graph, typically a ElasticSceneDefinitionNode. |
| GeoCoordinate | center | The center of the area in which to gather resources. |
| float | extents | The extents of the area in which to gather resources. |
| CancellationToken | cancellationToken | The token to monitor for cancellation requests. |
| IContextProvider[] | contextProviders | List of context providers required for the evaluated graph, if any. |
Returns
| Type | Description |
|---|---|
| Cysharp.Threading.Tasks.UniTask |
Examples
// Inside some MonoBehaviour:
void OnEnable() {
StartCoroutine(TileDataManager.PrefetchTileData(sceneDefinition, center, extents, GetComponents<IContextProvider>());
// or
StartCoroutine(DoPrefetchAndMore());
}
IEnumerator DoPrefetchAndMore() {
// ...
yield return TileDataManager.PrefetchTileData(sceneDefinition, center, extents, GetComponents<IContextProvider>());
// ...
}
PrefetchTileDataAsync(Node, Route, float, params IContextProvider[])
Prefetches resources (e.g. tile data) along a specified route.
Declaration
public static UniTask PrefetchTileDataAsync(Node sceneDefinition, Route route, float extents, params IContextProvider[] contextProviders)
Parameters
| Type | Name | Description |
|---|---|---|
| Node | sceneDefinition | The node up to which to gather resources for a graph, typically a ElasticSceneDefinitionNode. |
| Route | route | The route along which to prefetch. |
| float | extents | The extents around the route to prefetch. |
| IContextProvider[] | contextProviders | The context providers to use while prefetching. |
Returns
| Type | Description |
|---|---|
| Cysharp.Threading.Tasks.UniTask |
PrefetchTileDataAsync(Node, Route, float, CancellationToken, params IContextProvider[])
Prefetches resources (e.g. tile data) along a specified route.
Declaration
public static UniTask PrefetchTileDataAsync(Node sceneDefinition, Route route, float extents, CancellationToken cancellationToken, params IContextProvider[] contextProviders)
Parameters
| Type | Name | Description |
|---|---|---|
| Node | sceneDefinition | The node up to which to gather resources for a graph, typically a ElasticSceneDefinitionNode. |
| Route | route | The route along which to prefetch. |
| float | extents | The extents around the route to prefetch. |
| CancellationToken | cancellationToken | The token to monitor for cancellation requests. |
| IContextProvider[] | contextProviders | The context providers to use while prefetching. |
Returns
| Type | Description |
|---|---|
| Cysharp.Threading.Tasks.UniTask |