Switch on Gameplay Tag Descendants
UncookedOnly • Default Loading Phase
Plugin overview
This plugin adds a new node called Switch on Gameplay Tag Descendants.
This switch node automatically generates out execution pins from all descendants of a particular Gameplay Tag. It also has the capability to:
Change whether tags should match exactly or partially.
Change the type of pins that are generated.
Only connected pins are compiled. Unconnected pins never influence runtime performance.
A Gameplay Tag being a pin won't prevent you from deleting that tag in Gameplay Tags Settings. The switch statement dynamically adjusts itself when its descendants change.
Benefits over the traditional switch statement
Aside from automatic pin generation,
This new switch node uses the FName
to test against the GameplayTagContainer for each relevant case.
Switch on Gameplay Tag Container does some string operations before converting the string into a comparable Gameplay Tag.
Switch on Gameplay Tag Descendants directly uses the FName
after just one internal string conversion.
Creating a variety of gameplay options becomes much more maintainable, as you can immediately see which routes have not been handled yet.
You would no longer have to double-check your graphs to see if all branches for a particular tag have been handled, which is a massive time-saver.