Class AbilityPrefabColliderCache
Static cache of prefab colliders keyed by ability template ID. Extracted from AbilityObject to keep that class focused on lifecycle and collision. Avoids repeated GetComponent calls on the prefab every spawn.
public static class AbilityPrefabColliderCache
- Inheritance
-
AbilityPrefabColliderCache
- Inherited Members
Methods
Clear()
Clears the cache. Call after addressable bundle reloads to prevent stale collider references.
public static void Clear()
GetPrefabCollider(AbilityTemplate)
Returns the cached Collider from the ability's prefab, or null if none exists. Caches on first access. Detects and self-heals stale entries from addressable reloads.
public static Collider GetPrefabCollider(AbilityTemplate template)
Parameters
templateAbilityTemplateThe ability template whose prefab collider to get.
Returns
- Collider
The cached Collider from the prefab, or null if the prefab has no Collider.