Table of Contents

Class TileProviderDefinition

A tile provider your own code supplies, registered once with Register(TileProviderDefinition) and selected on a map by setting Provider to TileProvider.Registered and Registered Provider Id to this definition's Id.

public sealed class TileProviderDefinition
Inheritance
object
TileProviderDefinition

Remarks

Register from a [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] method, never from scene code: see TileProviderRegistry for why.

Fields

CreateDependencies

Required. Builds the tile pipeline this provider runs on, once per pipeline build. Attribution and the cache identity (CacheTag, DiskCacheKey) come from the Source it returns, exactly as they do for a built-in preset.

public Func<TileProviderRequest, TilePipelineDependencies> CreateDependencies

Field Value

Func<TileProviderRequest, TilePipelineDependencies>

DisplayName

Label for the inspector dropdown; falls back to Id.

public string DisplayName

Field Value

string

Id

Required, unique, and stable: scenes store this string, so renaming it repoints every map that named it.

public string Id

Field Value

string

RequiresApiKey

Shows the API key field on maps that select this provider.

public bool RequiresApiKey

Field Value

bool

Styles

Style names offered in the inspector, or null/empty for a provider with one look. The picked name arrives as Style.

public string[] Styles

Field Value

string[]

SupportsRetina512

Shows the 512 px @2x toggle on maps that select this provider.

public bool SupportsRetina512

Field Value

bool