Overview

WCGASAbilityGrantRegistry is a World Subsystem that serves as the centralized tracking system for all abilities granted to Ability System Components (ASCs) across all granting systems in the Wonderscape GAS Ally plugin. It automatically initializes per-world, tracks which systems have granted which abilities to which ASCs, prevents duplicate ability grants, and ensures safe removal by verifying no other system still requires the ability before allowing it to be cleared from the ASC.


Purpose

The Ability Grant Registry orchestrates ability grant coordination and removal safety by providing:


How It Works

Initialization Flow

  1. Subsystem Startup: When a World initializes (Game, PIE, or GamePreview), the subsystem is created via UE's subsystem lifecycle
  2. World Type ValidationShouldCreateSubsystem() ensures the registry only exists for playable worlds (not editor preview)
  3. Timer Setup: Starts a 30-second repeating timer calling CleanupStaleEntries() to remove destroyed ASC references
  4. Log Initialization: Logs world name to LogWCGASSubsystems for debugging