Skip to content
Version 2.11.0
↓ Get the launcher

IGameAssets interface

Toolkit service for loading game assets (textures, sprites) via the game’s own Addressables loader (ZResLoader). Provides an opaque texture handle so plugins can render icons without a direct Unity dependency on Texture2D.

public interface IGameAssets
name description
LoadBuffIcon(…) Atlas/texture handle for a buff/debuff’s icon, async-loaded via ZResLoader using the buff row’s icon path. Returns null while loading, on failure, or when the buff/icon is unknown; uv is the icon’s sub-rect ((0,0,1,1) until resolved).
LoadByPath(…) Loads an arbitrary game asset (atlas Sprite or standalone Texture2D) by its raw ZResLoader address, for content that has no dedicated id-based loader above — e.g. a dungeon crest whose path comes from a game table (TeamTargetTable.Icon / MatchPic). The asset type is auto-detected (Texture2D first, Sprite fallback). Returns null while loading, on failure, or for an empty path; safe to call every frame (the result is cached by path).
LoadImagineIcon(…) Atlas/texture handle for a Battle Imagine card icon, async-loaded via ZResLoader. Returns null while loading or when no icon is available; uv is the icon’s sub-rect.
LoadItemIcon(…) Atlas/texture handle for an item’s inventory icon, async-loaded via ZResLoader using the item row’s icon path. Returns null while loading, on failure, or when the item/icon is unknown; uv is the icon’s sub-rect ((0,0,1,1) until resolved).
LoadProfessionIcon(…) Returns the atlas texture handle for the profession icon identified by professionId, kicking off an async Addressables load on the first call. Returns null while loading, on failure, or when no profession row / icon path is available for the given id. (2 methods)
LoadSkillIcon(…) Atlas/texture handle for a skill’s icon, async-loaded via ZResLoader using the skill row’s icon path. Returns null while loading, on failure, or when the skill/icon is unknown; uv is the icon’s sub-rect ((0,0,1,1) until resolved).

Loading is asynchronous (driven by the game’s UniTask Addressables pipeline). Call LoadProfessionIcon every frame from an Update tick; it returns null while the load is in progress and the resolved texture handle once the load succeeds. A permanently failed load also returns null — the caller should fall back to text-only rendering.