> For the complete documentation index, see [llms.txt](https://dante-3.gitbook.io/dante-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dante-3.gitbook.io/dante-docs/indicator-system-plugin/indicator-subsystem/accessing-the-subsystem.md).

# Accessing the Subsystem

### C++

```cpp
// From any UObject with world context:
UIndicatorSubsystem* IndicatorSub =
    GetWorld()->GetGameInstance()->GetSubsystem<UIndicatorSubsystem>();

// Null-safe pattern:
if (UGameInstance* GI = GetWorld()->GetGameInstance())
{
    if (UIndicatorSubsystem* Sub = GI->GetSubsystem<UIndicatorSubsystem>())
    {
        // use Sub
    }
}
```

### Blueprint

Call the function **Get Indicator Manager Subsystem** (auto-exposed by `UGameInstanceSubsystem`) from any Blueprint, or use the utility function `UGameplayStatics::GetGameInstance` → **Get Subsystem**.<br>

***

## Methods

### Actor Registration

#### `AddIndicatorForActor`

```cpp
UFUNCTION(BlueprintCallable, Category = "Indicator Manager Subsystem")
void AddIndicatorForActor(AActor* InActor, UIndicatorDescriptor* InDescriptor);
```

Registers an `(Actor, Descriptor)` pair in the global registry. Called automatically by `UIndicatorManagerComponent::BeginPlay`. Only call this manually if you are managing indicators without a `UIndicatorManagerComponent`.

* Silently skips if `InActor` or `InDescriptor` is `nullptr`.
* Overwrites any existing entry for `InActor` — each actor maps to exactly one descriptor at the subsystem level.

#### `RemoveIndicatorForActor`

```cpp
UFUNCTION(BlueprintCallable, Category = "Indicator Manager Subsystem")
void RemoveIndicatorForActor(AActor* InActor);
```

Removes the actor's descriptor registration from `ActiveIndicators`. Called automatically by `UIndicatorManagerComponent::EndPlay`. Safe to call even if the actor is not registered — does nothing in that case.

#### `ClearAllIndicators`

```cpp
UFUNCTION(BlueprintCallable, Category = "Indicator Manager Subsystem")
void ClearAllIndicators();
```

Empties the entire `ActiveIndicators` map in one call. Useful for level transitions, respawn resets, or UI-off scenarios where all indicators should disappear immediately.

{% hint style="warning" %}
This does **not** notify individual `UIndicatorManagerComponent` instances. Their internal `Indicators` arrays remain populated. Use this only as a rendering kill-switch (e.g., the HUD will stop drawing), not as a substitute for proper actor cleanup.
{% endhint %}
