Data Groups
Reuse and Compose initial data across AbilitySystemComponents
Last updated
Reuse and Compose initial data across AbilitySystemComponents
Last updated
Sometimes we want to reuse the same set of data (e.g. attributes) to initialize an ASC with. Data Groups allow us to use the same group of data across multiple ASCs. For example, if we have a Soldier NPC and an Archer NPC. Both need to have a Health and a MovementSpeed attribute, but the Soldier must have an SwordAttack ability and the Archer a BowShoot ability. We can easily share the attributes by putting them in a GroupAttribute object and share it between the Archer's and Soldier's GroupASC.
Create a GroupASC ScriptableObject: Right click in a folder on the editor -> Create -> GAS -> DataGroup - AbilitySystemComponent Create a GroupAttribute: Right click -> Create -> GAS -> DataGroup - Attributes Create a GroupAttributeProcessors: Right click -> Create -> GAS -> DataGroup - AttributeProcessors Create a GroupGameplayAbility: Right click -> Create -> GAS -> DataGroup - GameplayAbilities Now, just drag and drop the Groups into the GroupASC to compose and reuse them however you want.