Class SkillAssets
- Namespace
- GrindFest
- Assembly
- GrindFest.dll
Shared assets that every skill may need, addressed by their Addressables address.
Only genuinely shared, character-level assets belong here (masks, generic consumable clips). Anything skill-specific is read from the skill's own data asset, so a mod can replace it.
Nothing here blocks and nothing here loads synchronously: a read returns what is resident, and on a miss it starts the acquire and returns null, so the next read is a hit. That is what keeps 58 skill properties non-async without a synchronous door — and the one-time warning names the cold address, so the set a hero scope should acquire is discoverable from a play session instead of by reading 27 files.
The honest limitation: the first use of an asset that nothing acquired yet does without it (the same behaviour a WebGL build already had). The fix is to acquire at setup, and the warning is the list.
public static class SkillAssets
- Inheritance
-
objectSkillAssets
Fields
Properties
- DrinkAnimationClip
The generic "drink potion" clip used by consumables.
- UpperBodyMask
Avatar mask restricting animations to the upper body (layer 1).
Methods
- ClearCache()
Drops cached references (used by tools and tests after a content reload).
- Clip(string, string)
A clip that lives inside an .fbx addressed as a whole asset.
- Get<T>(string)
Loads an asset by its Addressables address. Cached; safe to call every frame.
- PrefabComponent<T>(string)
A component that lives on a prefab addressed as a whole asset — an effect, a projectile, a drop table holder. This is the common case for skill FX: the field held the component, not the asset.
- Sprite(string, string)
A Sprite that lives inside a sheet (atlas / layered psd) addressed as a whole asset, e.g.
Sprite("Assets/…/fg4_icons_01.psd", "fg4_icons_shield").
- SubAsset<T>(string, string)
Resolves a sub-object by name from its parent asset, caching the result.