add_primary_asset_rule
Adds or updates a PrimaryAssetTypesToScan rule in the Asset Manager settings and writes DefaultGame.ini to register assets for cooking and scanning.
Instructions
Add a PrimaryAssetTypesToScan rule to the Asset Manager project settings, or update the rule of that type, then write DefaultGame.ini (no undo); a failed write makes success false. An update always resets the base class (to UObject when base_class_path is omitted), appends directory unless already listed and sets priority only when given; idempotent. Nothing is rescanned: run scan_primary_assets so the running Asset Manager registers the assets. Cook rules: set_primary_asset_cook_rule; inverse: remove_primary_asset_rule; list rules: get_primary_asset_types.
Returns: { type, base_class, saved, updated_existing, directory_count, type_count }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| priority | No | Scan rule priority (optional) | |
| directory | No | Content directory to scan for this type | |
| base_class_path | No | Asset base class path (defaults to UObject) | |
| primary_asset_type | Yes | Logical type name, e.g. "Item" |