> 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.md).

# Modular Attachment Definition

**Header:** `ModularAttachmentSystem/Data/ModularAttachmentDefinition.h`\
**Module:** `ModularAttachmentSystem`\
**Parent:** `UPrimaryDataAsset`\
**Specifiers:** `BlueprintType`, `Blueprintable`

***

## Overview

`UModularAttachmentDefinition` is the **composition layer** of the Modular Attachment System. It is a `UPrimaryDataAsset` that holds an ordered list of `UModularAttachmentFragment` instances, forming a complete attachment.

Think of it as a recipe:

```
RedDotScopeDefinition
├── Fragment: StaticMesh   (scope body)
├── Fragment: StaticMesh   (lens glass)
└── Fragment: Custom       (zoom modifier)
```

Definitions are:

* **Authored in the editor** — create via Content Browser → Modular Attachment System → Attachment Definition
* **Edited visually** — the custom asset editor provides a node-based fragment graph + 3D preview viewport
* **Loaded async** — the subsystem streams the definition and all its fragment soft refs before applying
* **Ref-counted** — when multiple components use the same definition, only one streaming handle is active

***

## Creating a Definition

{% tabs %}
{% tab title="Content Browser" %}
Right-click → **Modular Attachment System** → **Attachment Definition**
{% endtab %}

{% tab title="C++" %}

```cpp
UModularAttachmentDefinition* Def = NewObject<UModularAttachmentDefinition>(Package);
```

> Definitions are typically created as assets in the editor, not at runtime.
> {% endtab %}
> {% endtabs %}

***

## Next Steps

*
* [UModularAttachmentFragment](/dante-docs/modular-attachment-system/modular-attachment-fragment.md) — the building blocks applied by this component
* [UModularAttachmentComponent](/dante-docs/modular-attachment-system/modular-attachment-component.md) — the runtime mount point that loads definitions
* [UModularAttachmentSubsystem](/dante-docs/modular-attachment-system/modular-attachment-subsystem.md) — the coordinator this component communicates with
