AssetType
assets/asset.constants.ts:15The kind of resource an Asset wraps. The type determines which concrete Asset subclass an AssetLibrary produces when it loads a path, and which typed payload accessor that subclass exposes (e.g. ImageAsset.raw returns a texture for AssetType.Image).
The type is normally inferred from a path's file extension (see
inferAssetType), but callers can override the inference per load when a
URL has no usable extension — a CDN path, a query-string-suffixed URL, an
extensionless route. See AssetLoadOptions.type.
Branch on the type to recover the concrete subclass and its payload accessor (see the class-level docs on Asset for the pattern).
Enumeration Members
Audio An audio clip — MP3, OGG, WAV, M4A, AAC, FLAC, WebM, or Opus — decoded
into a Web Audio AudioBuffer. Wrapped by AudioAsset and
consumed by audio-playing components (AudioSource,
Music).
Font Image A raster image — PNG, JPEG, WebP, GIF, AVIF, BMP, or SVG — loaded into a GPU texture. Wrapped by ImageAsset and consumed by texture- and sprite-rendering components.