Skip to content

Examples

These patterns use tags as shared gameplay facts. Adapt the vocabulary to the needs of the project rather than copying every example path.

Character.State.Stunned
  1. Add the tag when the stun begins.
  2. Check it before movement, attacks, abilities, and interaction.
  3. Remove it when the stun expires.

Every participating system reads the same state instead of maintaining separate booleans.

Owned tags might include:

Character.State.Stunned
Character.State.Frozen
Character.State.Silenced

Query the parent when the same branch should apply to any of them:

Query: Character.State
Mode: Include Children
Faction.Player
Faction.Enemy
Faction.Neutral
Faction.Ally

Use an exact faction query for targeting, dialogue branches, or relationship rules. If candidate objects come from a physics query, filter by layer first and then by Gameplay Tag.

Damage.Type.Fire
Damage.Type.Ice
Damage.Type.Poison
Damage.Resistance.Fire
Damage.Immunity.Poison

Tags describe the damage type, resistance, or immunity. Numeric variables store the damage amount.

Quest.Main.Available
Quest.Main.Active
Quest.Main.Completed

Use an exclusive parent-group Action to ensure only one child under Quest.Main remains active.

Interaction.Usable
Interaction.Usable.Door
Interaction.Usable.Chest
Interaction.Locked

Raycast or overlap to reduce candidates, then query Interaction.Usable with Include Children to accept doors, chests, and other usable descendants.

The complete text workflow is available in Getting Started.

using SkywardGames.Runtime.GameplayTags;
using UnityEngine;
public class BurningState : MonoBehaviour
{
[SerializeField] private GameplayTagComponent tags;
private static readonly GameplayTag Burning =
GameplayTag.FromPath("Character.State.Burning");
public bool IsActive => tags.HasTag(Burning, exact: true);
public void Apply()
{
tags.AddTag(Burning);
}
public void Remove()
{
tags.RemoveTag(Burning);
}
}