# unreal_assets The `unreal_assets` tool covers everything in the Content Browser — searching the asset registry, inspecting metadata, creating and duplicating assets, and managing their location and lifecycle. It exposes 12 operations. ## Operations at a Glance | Operation | Hint | Description | |-----------|------|-------------| | `search` | readOnly | Search the asset registry by name, type, or path fragment | | `get_info` | readOnly | Get full metadata for a specific asset by path | | `list` | readOnly | List assets in a given content directory | | `dependencies` | readOnly | Return all assets this asset depends on | | `referencers` | readOnly | Return all assets that reference this asset | | `set_property` | idempotent | Set a property on an asset via reflection | | `save` | idempotent | Save one or more assets to disk | | `create_blueprint` | — | Create a new Blueprint class | | `duplicate` | — | Duplicate an existing asset | | `rename` | idempotent | Rename an asset in-place | | `delete` | destructive | Delete an asset (with reference check) | | `move` | idempotent | Move an asset to a new content path | ## search Searches the Unreal asset registry by name fragment, asset type, or content path. The fastest way to find an asset without knowing its exact path. ### Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `query` | string | yes | Name fragment to search for (case-insensitive) | | `asset_type` | string | no | Filter by class name, e.g. `Blueprint`, `StaticMesh`, `Material` | | `path` | string | no | Restrict search to this content path prefix | | `limit` | integer | no | Max results to return. Default: 50. Max: 200. | ```json { "operation": "search", "params": { "query": "BP_Enemy", "asset_type": "Blueprint", "limit": 20 } } ``` ```json { "operation": "search", "params": { "query": "Rock", "asset_type": "StaticMesh", "path": "/Game/Environment/" } } ``` ### Response ```json { "assets": [ { "name": "BP_Enemy_Goblin", "type": "Blueprint", "path": "/Game/Characters/Enemies/BP_Enemy_Goblin", "size_bytes": 45312, "last_modified": "2025-01-14T09:22:11Z" } ], "total": 1 } ``` > **Note:** `search` is tagged `readOnlyHint` — safe to run in parallel with any other read-only operations. ## get_info Returns full metadata for a single asset identified by its exact content path. ### Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `path` | string | yes | Full content path, e.g. `/Game/Characters/BP_Player` | ```json { "operation": "get_info", "params": { "path": "/Game/Characters/Enemies/BP_Enemy_Goblin" } } ``` ### Response ```json { "name": "BP_Enemy_Goblin", "type": "Blueprint", "path": "/Game/Characters/Enemies/BP_Enemy_Goblin", "parent_class": "/Script/Engine.Character", "size_bytes": 45312, "last_modified": "2025-01-14T09:22:11Z", "properties": { "MaxHealth": 100.0, "MovementSpeed": 300.0 }, "thumbnail": null } ``` ## list Lists all assets inside a content directory, optionally filtered by type. ### Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `path` | string | yes | Content directory path, e.g. `/Game/Characters/` | | `asset_type` | string | no | Filter by class name | | `recursive` | boolean | no | If true, includes subdirectories. Default: false. | ```json { "operation": "list", "params": { "path": "/Game/Characters/Enemies/", "recursive": true } } ``` ```json { "operation": "list", "params": { "path": "/Game/Materials/", "asset_type": "MaterialInstance" } } ``` ## dependencies Returns every asset that the target asset depends on — textures referenced by a material, meshes used by a Blueprint, etc. ### Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `path` | string | yes | Full content path of the asset | | `depth` | integer | no | How many levels of dependency to traverse. Default: 1. | ```json { "operation": "dependencies", "params": { "path": "/Game/Characters/Enemies/BP_Enemy_Goblin", "depth": 2 } } ``` ### Response ```json { "asset": "/Game/Characters/Enemies/BP_Enemy_Goblin", "dependencies": [ { "path": "/Game/Meshes/SK_Goblin", "type": "SkeletalMesh", "depth": 1 }, { "path": "/Game/Materials/MI_Goblin_Body", "type": "MaterialInstance", "depth": 1 }, { "path": "/Game/Textures/T_Goblin_Diffuse", "type": "Texture2D", "depth": 2 } ] } ``` ## referencers Returns every asset that references the target asset. Use this before renaming or deleting to understand what would break. ### Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `path` | string | yes | Full content path of the asset | ```json { "operation": "referencers", "params": { "path": "/Game/Materials/M_Rock_Base" } } ``` ### Response ```json { "asset": "/Game/Materials/M_Rock_Base", "referencers": [ { "path": "/Game/Materials/MI_Rock_Mossy", "type": "MaterialInstance" }, { "path": "/Game/Materials/MI_Rock_Dry", "type": "MaterialInstance" }, { "path": "/Game/Environment/SM_Boulder", "type": "StaticMesh" } ] } ``` > **Tip:** Always call `referencers` before `delete` or `rename` to avoid broken asset references. ## set_property Sets a property on an asset using UE's reflection system. Works on any `UPROPERTY`-exposed field. ### Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `path` | string | yes | Full content path of the asset | | `property` | string | yes | Property name (case-sensitive, as in UE reflection) | | `value` | any | yes | New value. Type must match the property. | ```json { "operation": "set_property", "params": { "path": "/Game/Characters/Enemies/BP_Enemy_Goblin", "property": "MaxHealth", "value": 150.0 } } ``` ```json { "operation": "set_property", "params": { "path": "/Game/Materials/MI_Rock_Mossy", "property": "ScalarParameterValues", "value": { "Roughness": 0.8 } } } ``` > **Note:** After `set_property`, call `save` to persist changes to disk. ## save Saves one or more assets to disk. Equivalent to pressing Ctrl+S in the Content Browser. ### Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `paths` | string[] | yes | Array of full content paths to save | ```json { "operation": "save", "params": { "paths": [ "/Game/Characters/Enemies/BP_Enemy_Goblin", "/Game/Materials/MI_Rock_Mossy" ] } } ``` > **Note:** `save` is tagged `idempotentHint` — calling it twice on the same asset is safe. ## create_blueprint Creates a new Blueprint class asset. This is the preferred way to create Blueprints programmatically. ### Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `path` | string | yes | Destination content path including the new asset name | | `parent_class` | string | yes | Parent class path, e.g. `/Script/Engine.Actor` or a Blueprint path | ```json { "operation": "create_blueprint", "params": { "path": "/Game/Characters/Enemies/BP_Enemy_Troll", "parent_class": "/Script/Engine.Character" } } ``` ```json { "operation": "create_blueprint", "params": { "path": "/Game/Items/BP_Sword_Iron", "parent_class": "/Game/Items/BP_ItemBase" } } ``` ### Response ```json { "path": "/Game/Characters/Enemies/BP_Enemy_Troll", "type": "Blueprint", "parent_class": "/Script/Engine.Character", "created": true } ``` > **Tip:** After creating a Blueprint, use `unreal_blueprints` operations (`add_variable`, `add_function`, `add_node`) to build out its implementation. ## duplicate Duplicates an existing asset to a new path. Preserves all properties and internal references. ### Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `source` | string | yes | Full content path of the asset to duplicate | | `destination` | string | yes | Full content path for the new copy (including new name) | ```json { "operation": "duplicate", "params": { "source": "/Game/Characters/Enemies/BP_Enemy_Goblin", "destination": "/Game/Characters/Enemies/BP_Enemy_GoblinElite" } } ``` ## rename Renames an asset in-place. The asset stays in its current directory; only the name changes. ### Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `path` | string | yes | Full content path of the asset to rename | | `new_name` | string | yes | New asset name (without path, without extension) | ```json { "operation": "rename", "params": { "path": "/Game/Characters/Enemies/BP_Enemy_GoblinElite", "new_name": "BP_Enemy_GoblinBoss" } } ``` > **Warning:** Rename updates the asset registry but does not automatically fix hard-coded string references to the old name in C++ or Blueprint logic. Always run `referencers` before renaming shared assets. ## delete Deletes an asset. Runs a reference check before deleting to warn about dependents. ### Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `path` | string | yes | Full content path of the asset to delete | | `force` | boolean | no | If true, skip reference check and delete anyway. Default: false. | ```json { "operation": "delete", "params": { "path": "/Game/Temp/BP_TestActor" } } ``` ```json { "operation": "delete", "params": { "path": "/Game/Temp/BP_TestActor", "force": true } } ``` > **Warning:** `delete` is tagged `destructiveHint`. Without `force`, the operation returns an error if any asset references the target. With `force`, references become null pointers in the referencing assets. Always call `referencers` first. ## move Moves an asset to a different content directory. The asset name stays the same unless you also provide a new name. ### Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `path` | string | yes | Current full content path of the asset | | `destination` | string | yes | Destination directory path (not including the asset name) | | `new_name` | string | no | Rename the asset during the move. If omitted, keeps current name. | ```json { "operation": "move", "params": { "path": "/Game/Temp/BP_EnemyPrototype", "destination": "/Game/Characters/Enemies/" } } ``` ```json { "operation": "move", "params": { "path": "/Game/Temp/BP_EnemyPrototype", "destination": "/Game/Characters/Enemies/", "new_name": "BP_Enemy_Skeleton" } } ``` ## Common Patterns ### Find, Inspect, Modify, Save ```javascript // 1. Find the asset const results = await search({ query: "MI_Rock", asset_type: "MaterialInstance" }) const assetPath = results.assets[0].path // 2. Inspect it const info = await get_info({ path: assetPath }) // 3. Modify a property await set_property({ path: assetPath, property: "Roughness", value: 0.9 }) // 4. Save await save({ paths: [assetPath] }) ``` ### Safe Delete Workflow ```javascript // 1. Check who references the asset const refs = await referencers({ path: "/Game/Temp/OldMaterial" }) if (refs.referencers.length === 0) { // Safe to delete await delete({ path: "/Game/Temp/OldMaterial" }) } else { // Report the blockers console.log("Cannot delete — referenced by:", refs.referencers.map(r => r.path)) } ``` ### Duplicate and Differentiate ```javascript // Create a variant of an existing Blueprint await duplicate({ source: "/Game/Characters/Enemies/BP_Enemy_Goblin", destination: "/Game/Characters/Enemies/BP_Enemy_GoblinElite" }) // Boost the elite's stats await set_property({ path: "/Game/Characters/Enemies/BP_Enemy_GoblinElite", property: "MaxHealth", value: 250 }) await set_property({ path: "/Game/Characters/Enemies/BP_Enemy_GoblinElite", property: "MovementSpeed", value: 450 }) await save({ paths: ["/Game/Characters/Enemies/BP_Enemy_GoblinElite"] }) ``` ### Parallel Read Operations ```javascript // All three are readOnlyHint — fire simultaneously parallel([ search({ query: "BP_Enemy", asset_type: "Blueprint" }), list({ path: "/Game/Materials/", asset_type: "MaterialInstance" }), get_info({ path: "/Game/Characters/BP_Player" }), ]) ```