Projectile ability component
Note: the following applies to both "Targeted Ability Component" and "Directional Ability Component"
The actual component that holds a reference to a Projectile ability so it can be Cast at runtime.
See also: Pooling, Projectile Pool, Ability component settings
Projectile Ability
The ability that this component handles.
Projectile pool
The pool that handles the projectiles of this ability. This can be left empty if you want SPAM to automatically resolve a pool at Start.
Note that not assigning and pre-filling a pool has a performance cost. For optimal performance, pre spawn and pre fill a pool with projectiles, and assign that pool to each ability in the inspector.
Spawn point
Where the projectile should be spawned from. This will be automatically assigned when you add the ability to a caster if you've set a default projectile spawn point on the Ability Invoker.
Prespawn All Ranks
This will create pools for all projectiles of all ranks on start. This is useful to front-load the initialization to the beginning of scene load (or caster instantiation).
Remove Pool On Destroy
If this is checked, the pool assigned to the ability will be removed when the ability is removed/destroyed. This is useful for abilities with unique projectiles that aren't shared or reused.
PreCastProjectileSetup (Code only)
Called right before a projectile is spawned and starts to move.
If you require any other modification of the projectile pre-cast, add an action to this property and
that action will run to modify the actual projectile instance that's about to spawn.
Note that any changes you do might (or might not) break the projectile or get reset/overriden. If you're unsure, either check the source (Projectile.cs
) or ask for help on Discord.
Currently known safe changes are:
- Changing projectile layer
- Setting/changing projectile tag