| wiki |
A flexible and extensible Gameplay Ability System for Unity, inspired by Unreal Engine's GAS. This framework is designed to provide a solid foundation for managing abilities, attributes, and gameplay effects in any Unity project.
- Attribute System: Define custom attributes like Health, Mana, Stamina with features like min/max values and regeneration.
- Abilities & Effects: Create complex abilities with costs, cooldowns, cast times, and targeting systems (Self, Target, Area).
- Gameplay Effects: Apply both instant and duration-based effects to modify attributes (e.g., buffs, debuffs).
- Stacking Effects: Control how effects can stack on a target.
- Tag System: A powerful tag system (
GameplayTag
) to manage states, immunities, and triggers. - [cite_start]Custom Editors: User-friendly custom inspectors for easier configuration of abilities, attributes, and effects right inside the Unity Editor.
- 2D & 3D Support: Designed to work for both 2D and 3D games.
- Go to the Releases page.
- Download the latest
UGAS by Sajad Amiri.unitypackage
file. - Open your Unity project.
- Import the downloaded package by navigating to
Assets > Import Package > Custom Package...
.
- Create an Attribute: Create new
AttributeDefinition
ScriptableObjects (e.g., Health, Mana) from theCreate > GAS > Attribute Definition
menu. - Add AttributeSet: Add the
AttributeSet
component to your character and assign the initial attributes. - Create an Ability: Create a new
AbilityDefinition
from theCreate > GAS > Ability Definition
menu. Configure its cost, cooldown, and effects. - Activate an Ability: Get a reference to the
AbilitySystem
component on your character and call theTryActivateAbility()
method.
public AbilitySystem abilitySystem;
public AbilityDefinition fireballAbility;
void CastFireball()
{
abilitySystem.TryActivateAbility(fireballAbility, target);
}
This project is licensed under the MIT License - see the LICENSE file for details.