> 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-manager-component/lifecycle.md).

# Lifecycle

### `BeginPlay`

```
BeginPlay()
  ├─ Create UIndicatorDescriptor (outer = this)
  ├─ Descriptor->SetDataObject(GetOwner())
  ├─ if ACharacter → SetSceneComponent(CapsuleComponent)
  │   else AActor  → SetSceneComponent(RootComponent)
  ├─ For each UIndicatorSetupActions in IndicatorSetupConfig->Configs
  │     SetupAction->OnIndicatorSetupActivated(this, Descriptor)
  ├─ UIndicatorSubsystem::AddIndicatorForActor(GetOwner(), Descriptor)
  └─ AddIndicator(Descriptor)
```

### `EndPlay`

```
EndPlay(Reason)
  ├─ UIndicatorSubsystem::RemoveIndicatorForActor(GetOwner())
  ├─ For each UIndicatorSetupActions in IndicatorSetupConfig->Configs
  │     SetupAction->OnIndicatorSetupDeactivated(this, Descriptor)
  └─ RemoveIndicator(Descriptor)
```

***

## Component Flags

| Flag            | Value  | Effect                                                               |
| --------------- | ------ | -------------------------------------------------------------------- |
| `bAutoRegister` | `true` | Automatically registers with the actor's component list              |
| `bAutoActivate` | `true` | Component is activated immediately — no manual `Activate()` required |

***

## Common Patterns

### Checking for an indicator at runtime

```cpp
bool bHasIndicator = UIndicatorManagerComponent::GetComponent(MyActor) != nullptr;
```

### Dynamically hiding an indicator

Get the descriptor and toggle visibility directly:

```cpp
if (UIndicatorManagerComponent* IMC = UIndicatorManagerComponent::GetComponent(MyActor))
{
    for (UIndicatorDescriptor* Desc : IMC->GetIndicators())
    {
        Desc->SetDesiredVisibility(false);
    }
}
```

### Multiple indicators on one actor

```cpp
UIndicatorDescriptor* ExtraDesc = NewObject<UIndicatorDescriptor>(IMC);
ExtraDesc->SetIndicatorClass(MySecondWidgetClass);
ExtraDesc->SetSceneComponent(MyActor->GetRootComponent());
IMC->AddIndicator(ExtraDesc);
```
