Skip to content
Version 2.11.0
↓ Get the launcher

IGameAssets.LoadProfessionIcon method (1 of 2)

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.

public object? LoadProfessionIcon(int professionId)
parameter description
professionId The numeric profession id (1–11 for known classes).

An opaque UnityEngine.Texture2D handle (safe to cast to UnityEngine.Texture for rendering) or null. The UV sub-rect for the icon’s region within the atlas is returned via LoadProfessionIcon.


IGameAssets.LoadProfessionIcon method (2 of 2)

Section titled “IGameAssets.LoadProfessionIcon method (2 of 2)”

Same as LoadProfessionIcon but also returns the normalised UV rect (UvRect — 0..1 range, bottom-left origin, UV texture-space convention) for the icon’s sub-region within the atlas. Pass the handle and UV to a SpriteElement or MeterRowData.CrestTexture / CrestUv pair.

public object? LoadProfessionIcon(int professionId, out UvRect uv)
parameter description
professionId The numeric profession id (1–11 for known classes).
uv The UV sub-rect for the icon. Set to (0,0,1,1) (full texture) when the texture is not yet available or the load failed.