CResourceManager
Overview
UCResourceManager is a UGameInstanceSubsystem that manages a named resource inventory (resourceMap) and a mechanic object registry (mecanikMap). It implements ICResourceData and broadcasts onResourceEvent on every resource change. Registered as a singleton via CNAME_Singleton_ResourceManager.
Functions
| Name | Description |
|---|---|
| getInstance | Returns the UCResourceManager instance from a given actor’s game instance |
| countAny | Returns the quantity of a single named resource |
| countAll | Returns the summed quantity of multiple named resources (duplicates counted once) |
| removeAny | Removes a single named resource from the map and broadcasts |
| removeAll | Removes multiple named resources from the map and broadcasts |
| setupAny | Sets a single named resource to a given count and broadcasts |
| setupAll | Sets multiple named resources to a given count and broadcasts |
| consume | Decreases a resource by count, resolves its UClass from DataTable, broadcasts. Returns new stock |
| supply | Increases a resource by count, resolves its UClass from DataTable, broadcasts. Returns new stock |
| boundToOnResourceEvent | Binds an ICResourceBoundable listener to the onResourceEvent delegate |
| unboundToOnResourceEvent | Unbinds an ICResourceBoundable listener from the onResourceEvent delegate |