> 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/modular-attachment-system/modular-attachment-definition/methods.md).

# Methods

### `GetPrimaryAssetId`

```cpp
virtual FPrimaryAssetId GetPrimaryAssetId() const override;
```

Returns `"AttachmentDefinition:<AssetName>"`. This ID is used by the Asset Manager for discovery and by the subsystem's cache as the key.

**Example return:** `AttachmentDefinition:AD_RedDotScope`

### `CollectAllSoftRefs`

```cpp
void CollectAllSoftRefs(TArray<FSoftObjectPath>& OutRefs) const;
```

Recursively walks all top-level fragments and calls `CollectSoftRefs()` on each. The result is a flat array of every soft asset path that must be streamed before any fragment can apply.

This method is called by the subsystem during **Phase 2** of the load pipeline to build a single batch `FStreamableHandle`.

```
Phase 2 flow:
  Subsystem calls Definition→CollectAllSoftRefs(OutRefs)
    ├── Fragment A → CollectSoftRefs() → mesh path, material path
    ├── Fragment B → CollectSoftRefs() → skeletal mesh path, anim class path
    └── Fragment C → CollectSoftRefs() → niagara system path
  Subsystem batches all paths into one RequestAsyncLoad()
```

> Child fragments' soft refs are collected automatically — `CollectSoftRefs_Implementation` on the base class recurses into `AttachedFragments`.

***
