SPAM Framework Documentation

Resources

Resources can (optionally) be used to further constrain when an ability can be cast.
There is a sample included which shows how resources can be used to represent bullets in a first person shooter.

To enable resources you need to make two custom classes in your project:

  1. A pool, which derives from AbilityResourcePool, f.eg. BulletsPool
  2. A resource, which derives from AbilityResourceSO, f.eg. Bullets

Assign the resource to the ability, under General settings, and add the pool next to (or as a child of) the invoker.
Now, each time you call cast on the ability the invoker will try and resolve the given amount of resource from the pool. When there's not enough resources to cast, the cast will be cancelled.

Backlinks: