fix: Update data asset documentation for clarity and consistency in type definitions
This commit is contained in:
@@ -13,15 +13,26 @@ The Modular Game Framework uses `UDataAsset` (and subclass `UPrimaryDataAsset` w
|
||||
### Conventions
|
||||
- **Naming:** `DA_<Domain><Subtype>` — e.g., `DA_WeaponData`, `DA_AIProfile`, `DA_AtmosphereProfile`
|
||||
- **Storage:** All DA files live in `Content/DataAssets/<Domain>/` in-engine
|
||||
- **Loading:** Use `UAssetManager` with `FPrimaryAssetType` and `FPrimaryAssetId` for async loading
|
||||
- **Validation:** Each DA implements `ValidateData()` for editor-time data integrity checks
|
||||
- **Gameplay Tags:** All DAs carry a `FGameplayTagContainer` for query and filtering
|
||||
- **Parent Class:** `Primary Data Asset` (Blueprint class). Maps to C++ `UPrimaryDataAsset`.
|
||||
- **Loading:** Use `Async Load Primary Asset` node with `Primary Asset Id` and `Primary Asset Type`
|
||||
- **Validation:** Each DA implements a `ValidateData()` function for editor-time data integrity checks
|
||||
- **Gameplay Tags:** All DAs carry a `Gameplay Tag Container` for query and filtering
|
||||
|
||||
### Dependency Rules
|
||||
1. DAs reference other DAs by `FPrimaryAssetId` or `TSoftObjectPtr`, never by hard pointer
|
||||
1. DAs reference other DAs by `Primary Asset Id` or `Soft Object Reference`, never by hard pointer
|
||||
2. No DA may reference a runtime system; only other DAs
|
||||
3. Circular DA references are prohibited — use `World Context Object` for runtime resolution
|
||||
4. All DA types are registered in `DefaultGame.ini` under `[/Script/Engine.AssetManagerSettings]`
|
||||
- In BP: configure via **Project Settings → Asset Manager → Primary Asset Types to Scan**
|
||||
|
||||
### BP Type Reference
|
||||
| C++ Type | Blueprint Variable Type | BP Node |
|
||||
|----------|------------------------|---------|
|
||||
| `FPrimaryAssetId` | `Primary Asset Id` | `Make Primary Asset Id`, `Break Primary Asset Id` |
|
||||
| `FPrimaryAssetType` | `Primary Asset Type` | `Make Primary Asset Type` |
|
||||
| `TSoftObjectPtr<T>` | `Soft Object Reference` | `Async Load Primary Asset`, `Resolve Soft Reference` |
|
||||
| `FGameplayTagContainer` | `Gameplay Tag Container` | `Has Tag`, `Add Tag`, `Has Any` |
|
||||
| `UPrimaryDataAsset` | `Primary Data Asset` (parent class) | Right-click → Miscellaneous → Data Asset → PrimaryDataAsset |
|
||||
|
||||
### Registered DA Types (Section 13 of Master)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user