Asset¶
56 tools for finding assets by name, type, tag or folder, collections, metadata tags, thumbnails, importing textures and sounds, render targets, and static meshes (sockets, collision, Nanite, lightmaps, material slots).
Back to the index.
add_asset_to_collection¶
Additive
Add one asset, by object path, to an existing static Content Browser collection of the project and read the membership back. The collection is looked up by collection_name within share_type (default Local; an unrecognised value also means Local), which must be the share type it was created with: a name not found there is an error. The asset itself is not loaded or checked. An asset that is already a member makes the collection manager refuse the add, which comes back as an error with its reason. The manager writes the collection file itself, outside the undo history. verified confirms membership and object_count counts the direct members. Create the collection with create_collection; the inverse is remove_asset_from_collection; list members with get_collection_assets and collections with get_collections.
| Parameter | Type | Required | Description |
|---|---|---|---|
collection_name |
string | yes | Name of the (existing) collection. |
asset_path |
string | yes | Object path of the asset to add, e.g. "/Game/Props/SM_Chair.SM_Chair"; used as given, without loading or checking the asset. |
share_type |
string | no | ECollectionShareType: "Local", "Private", or "Shared" (optional, default "Local"); an unrecognised value falls back to Local |
Returns: { collection_name: string, share_type: string, asset_path: string, added: bool, verified: bool, object_count: number }
add_static_mesh_socket¶
Additive
Add a new socket to a UStaticMesh asset (package or object path) with an optional relative location, rotation, scale and tag, then save the mesh; no undo transaction. A socket_name the mesh already has is an error, and so is a location, rotation or scale that is not three numbers; both are checked before the mesh is touched. A failed save is an error, yet the socket stays on the mesh in memory. Edit an existing socket with set_static_mesh_socket_transform or rename_static_mesh_socket; list them with get_static_mesh_info; skeletal meshes use add_skeletal_mesh_socket.
| Parameter | Type | Required | Description |
|---|---|---|---|
static_mesh_path |
string | yes | Content path to the UStaticMesh asset. |
socket_name |
string | yes | Name for the new socket. |
location |
array | no | Socket relative location as [x, y, z] (optional) |
rotation |
array | no | Socket relative rotation as [pitch, yaw, roll] (optional) |
scale |
array | no | Socket relative scale as [x, y, z] (optional; defaults to 1,1,1) |
tag |
string | no | Free-form socket tag string (optional) |
Returns: { static_mesh_path, socket_name, socket_count, location_x, location_y, location_z, scale_x, scale_y, scale_z, tag, added, saved, save_error? } -- added is read back (the name resolves to the new socket)
clear_render_target¶
Destructive Idempotent
Fill a whole UTextureRenderTarget2D with one solid color via ClearRenderTarget2D, reporting the width and height it covered. Render-target contents live on the GPU only, so nothing is saved or undoable. cleared is false, and the call fails, when the engine skips the clear: a render target without a resource, which is every render target in a process that cannot render (-nullrhi, a commandlet).
| Parameter | Type | Required | Description |
|---|---|---|---|
render_target_path |
string | yes | Asset path of the render target |
color |
string | no | Optional [r, g, b, a] clear color, defaults to opaque black |
Returns: { render_target_path: string, cleared: bool, clear_color: [number], width: int, height: int }
create_collection¶
Additive Idempotent
Create a static Content Browser collection named collection_name in the project's collection container, under share_type (default Local; Private or Shared otherwise, and an unrecognised value falls back to Local). Idempotent: when that name already exists under that share type nothing is created and the call succeeds with created false and already_existed true; the check looks at that share type only. The collection manager writes the collection file itself, outside the undo history, and a creation it refuses is an error carrying its reason. exists is read back afterwards. Fill it with add_asset_to_collection, list collections with get_collections and members with get_collection_assets; the inverse is delete_collection. A Material Parameter Collection is a different asset: create_material_parameter_collection.
| Parameter | Type | Required | Description |
|---|---|---|---|
collection_name |
string | yes | Name of the collection to create. |
share_type |
string | no | ECollectionShareType: "Local", "Private", or "Shared" (optional, default "Local"); an unrecognised value falls back to Local |
Returns: { collection_name: string, share_type: string, created: bool, already_existed: bool, exists: bool }
create_render_target_2d¶
Additive
Create a UTextureRenderTarget2D asset at package_path/name with the given size and format, black clear color, and save it. An existing one there is returned as is: width, height and format are then ignored (already_exists:true). Returns asset_path, width, height, format and pixel_format.
| Parameter | Type | Required | Description |
|---|---|---|---|
name |
string | yes | Name of the render target asset to create |
package_path |
string | no | Target content path, defaults to /Game/RenderTargets |
width |
number | no | Render target width in pixels, default 256 |
height |
number | no | Render target height in pixels, default 256 |
format |
string | no | Render target format, default RTF_RGBA8: RTF_R8, RTF_RG8, RTF_RGBA8, RTF_RGBA8_SRGB, RTF_R16f, RTF_RG16f, RTF_RGBA16f (HDR), RTF_R32f, RTF_RG32f, RTF_RGBA32f or RTF_RGB10A2, RTF_ prefix optional; an unknown value falls back to RTF_RGBA8 with format_warning |
Returns: { render_target_name: string, asset_path: string, created: bool, already_exists: bool, saved: bool, width: int, height: int, format: string, pixel_format: string, format_warning: string, save_error: string }
create_render_target_2d_array¶
Destructive
Creates a persisted UTextureRenderTarget2DArray. Wraps UTextureRenderTarget2DArray::Init(SizeX, SizeY, Slices, Format) and saves the asset to disk. An asset already at package_path/name, of any class, is refused with success=false, its existing_class named, and nothing is deleted or created; to rebuild one, delete it first with delete_asset or pick a new name. format accepts one of "B8G8R8A8"/"BGRA8" (default), "FloatRGBA"/"RGBA16F", "RGBA32F", "R16F".
| Parameter | Type | Required | Description |
|---|---|---|---|
name |
string | yes | Name of the render-target-array asset to create |
package_path |
string | no | Content folder; defaults to /Game/Textures |
size |
number | no | Optional square edge in pixels; clamped 1..8192 |
slices |
number | no | Optional slice count; clamped 1..512 |
format |
string | no | Optional EPixelFormat name; defaults to BGRA8 |
Returns: { render_target_name: string, asset_path: string, size_x: int, size_y: int, slices: int, format: string, created: bool, saved: bool, save_error?: string, existing_class?: string }
create_render_target_cube¶
Destructive
Creates a persisted UTextureRenderTargetCube (6-face cube render target). Wraps UTextureRenderTargetCube::Init(SizeX, Format) when a format is given, or InitAutoFormat(SizeX) otherwise, and saves the asset to disk. An asset already at package_path/name, of any class, is refused with success=false, its existing_class named, and nothing is deleted or created; to rebuild one, delete it first with delete_asset or pick a new name. format accepts one of "B8G8R8A8"/"BGRA8", "FloatRGBA"/"RGBA16F", "RGBA32F". When omitted the format is auto-derived (InitAutoFormat).
| Parameter | Type | Required | Description |
|---|---|---|---|
name |
string | yes | Name of the cube render-target asset to create |
package_path |
string | no | Content folder; defaults to /Game/Textures |
size |
number | no | Optional cube edge in pixels; clamped 1..8192 |
format |
string | no | Optional EPixelFormat name; defaults to auto-derived |
Returns: { render_target_name: string, asset_path: string, size_x: int, format: string, created: bool, saved: bool, save_error?: string, existing_class?: string }
create_static_texture_from_render_target¶
Destructive
Bakes a UTexture2D from an existing UTextureRenderTarget2D (editor only). Wraps UKismetRenderingLibrary::RenderTargetCreateStaticTexture2DEditorOnly and saves the resulting static texture to disk. An asset already at package_path/name, of any class, is refused with success=false, its existing_class named, and nothing is deleted or created; to rebuild one, delete it first with delete_asset or pick a new name. render_target_path accepts either short "/Game/MyGame/RT_Example" or fully-qualified "...RT_Example.RT_Example" asset paths.
| Parameter | Type | Required | Description |
|---|---|---|---|
render_target_path |
string | yes | Asset path of the source render target (e.g. "/Game/MyGame/RT_Example" or fully-qualified "...RT_Example.RT_Example") |
name |
string | yes | Name of the static texture asset to create |
package_path |
string | no | Content folder; defaults to /Game/Textures |
Returns: { texture_name: string, asset_path: string, render_target_path: string, created: bool, saved: bool, width: int, height: int, format: string, save_error?: string, existing_class?: string }
create_texture_2d_array¶
Destructive
Creates a persisted UTexture2DArray from slices (no external file import). If source_texture_paths is given, those UTexture2D assets are loaded into the array's SourceTextures; otherwise slice_count small solid-color slices of size x size are generated. The array Source is then built via UTexture2DArray::UpdateSourceFromSourceTextures(true) and the asset is saved. An asset already at package_path/name, of any class, is refused with success=false, its existing_class named, and nothing is deleted or created; to rebuild one, delete it first with delete_asset or pick a new name. source_texture_paths is an optional array of UTexture2D asset paths used as the array's slices. Each must have a valid editor source. If omitted, slices are generated. size is the per-slice pixel size (clamped 1..2048).
| Parameter | Type | Required | Description |
|---|---|---|---|
name |
string | yes | Name of the texture-array asset to create |
package_path |
string | no | Content folder; defaults to /Game/Textures |
slice_count |
number | no | Optional number of generated slices when source_texture_paths is omitted; clamped 1..64; defaults to 2 |
size |
number | no | Optional per-slice pixel size; clamped 1..2048; defaults to 64 |
source_texture_paths |
array | no | Optional array of UTexture2D asset paths used as slices |
Returns: { texture_array_name: string, asset_path: string, width: int, height: int, num_slices: int, format: string, created: bool, saved: bool, save_error?: string, existing_class?: string }
create_texture_2d_from_data¶
Destructive
Create a UTexture2D asset filled with one solid color, with no source file: it allocates a BGRA8 editor source of width x height, fills every pixel with fill_color, sets sRGB with default compression, builds the resource and saves the asset to disk; no undo step. Use it for placeholder or mask textures; to bring in an image file use import_texture_file, to bake a render target create_static_texture_from_render_target, to change compression or sRGB afterwards set_properties, and get_texture_info to read it back. It only creates: an asset already at package_path/name, of any class, is refused with success=false, its existing_class named, and nothing is deleted or created; to rebuild a texture, delete it first with delete_asset or pick a new name. An invalid package path is an error. A failed save (always while PIE runs) makes success false, with saved=false and save_error, the texture kept in memory.
| Parameter | Type | Required | Description |
|---|---|---|---|
name |
string | yes | Asset name of the texture, no folder, e.g. "T_Mask_White". |
package_path |
string | no | Content folder as a long package path, e.g. "/Game/Textures/Placeholders" (default /Game/Textures; one trailing slash is dropped). |
width |
integer | no | Width in pixels, a whole number clamped to 1..8192 (default 64). |
height |
integer | no | Height in pixels, a whole number clamped to 1..8192 (default 64). |
fill_color |
array | no | [R, G, B, A] as 0-255 numbers, each rounded and clamped, e.g. [255, 0, 0, 255] for opaque red; missing trailing entries keep the default 255 (opaque white). |
Returns: { texture_name: string, asset_path: string, created: bool, saved: bool, width: int, height: int, format: string, has_source: bool, fill_color: [int, int, int, int], save_error?: string, existing_class?: string }
delete_collection¶
Destructive Idempotent
Deletes a Content Browser collection of the project, looked up by name within share_type; only the collection goes, the assets it lists are not touched. The collection manager writes the change to its collection file itself, outside the undo history, so it cannot be undone. Idempotent: a name not found in that share type succeeds with already_absent true and nothing changes, so pass the share type the collection was created with (a wrong one reads as absent); get_collections lists names and share types. A collection that exists but that the manager fails to delete is an error. Inverse of create_collection; to take single assets out instead, use remove_asset_from_collection, and get_collection_assets to see the members first.
| Parameter | Type | Required | Description |
|---|---|---|---|
collection_name |
string | yes | Name of the collection to delete, as get_collections lists it (e.g. "Props_Review"). |
share_type |
string | no | ECollectionShareType the collection was created with: "Local", "Private", or "Shared" (optional, default "Local"); an unrecognised value falls back to Local. |
Returns: { collection_name: string, share_type: string, destroyed: bool, already_absent: bool, exists: bool }
diff_asset_versions¶
Read-only
Apply the binary ref-scan of scan_uasset_references to the SAME asset (rel_path) across N external Content roots, reporting ref-count / size / mtime (and optional pattern-match count) per root so you can tell an incomplete (stub) copy from the complete one at a glance.
| Parameter | Type | Required | Description |
|---|---|---|---|
rel_path |
string | yes | Asset path relative to each root's Content dir, e.g. 'Characters/Mannequin/ABP_Manny.uasset' (a missing extension defaults to .uasset). |
roots |
array | yes | List of external Content-root directories to compare across. |
pattern |
string | no | Optional regex (ECMAScript) forwarded to the scan; when set, roots rank by pattern-match count instead of ref-path count. |
Returns: { rel_path: string, pattern: string, roots: [{root, full_path, exists, size_bytes, modified, ref_path_unique, ref_path_occurrences, match_unique, match_occurrences}], most_complete_root: string, likely_stub_root: string, message: string }
diff_content_trees¶
Read-only
Compare two Content folders (project vs external, fork vs source) WITHOUT loading the editor: reports assets added/removed/changed keyed by relative path, using file size and (optionally) a whole-file MD5 content hash. Verifies a Migrate or audits a fork on disk. Each tree may be a disk directory OR a /Game|/Engine mount path.
| Parameter | Type | Required | Description |
|---|---|---|---|
tree_a |
string | yes | First Content folder: absolute disk dir or /Game|/Engine mount path. |
tree_b |
string | yes | Second Content folder: absolute disk dir or /Game|/Engine mount path. |
hash |
boolean | no | Optional bool (default true). When true, same-size files are compared by MD5 to detect content changes; when false, only size is compared. |
Returns: { tree_a: string, tree_b: string, dir_a: string, dir_b: string, only_in_a: [string], only_in_b: [string], changed: [{rel, size_a, size_b, hash_a, hash_b, reason}], identical_count: int, only_in_a_count: int, only_in_b_count: int, changed_count: int, message: string }
draw_line_to_render_target¶
Destructive
Draw one straight line onto a UTextureRenderTarget2D asset in a single canvas pass in the editor world (UCanvas::K2_DrawLine), from start to end in render-target pixels, with color and thickness. The line blends over the existing pixels: nothing is cleared, saved or undoable, each call adds another line, and render-target contents live on the GPU only, so keep them with create_static_texture_from_render_target or export_render_target. Wipe it first with clear_render_target; for text, a texture or a material use draw_text_to_render_target, draw_texture_to_render_target or draw_material_to_render_target; get_render_target_info gives the size, create_render_target_2d makes a target. A missing render target is an error; drawn is false, and the call fails, when start and end are the same point (the canvas skips a zero-length line).
| Parameter | Type | Required | Description |
|---|---|---|---|
render_target_path |
string | yes | Asset path of the destination UTextureRenderTarget2D, e.g. "/Game/RT/RT_Canvas" |
start |
string | yes | Line start [x, y] in render-target pixels from the top-left corner, e.g. [0, 0] |
end |
string | yes | Line end [x, y] in render-target pixels from the top-left corner, e.g. [256, 128]; it must differ from start |
color |
string | no | Optional [r, g, b, a] linear color, each usually 0..1; channels left out keep opaque white, the default |
thickness |
number | no | Optional line thickness in pixels, default 1 |
Returns: { render_target_path: string, drawn: bool, thickness: number, start: [number], end: [number] }
draw_material_to_render_target¶
Destructive
Render a material into a UTextureRenderTarget2D: a full-screen quad by default, or, with position and/or size, a rectangle in render-target pixels from the top-left drawn in one canvas pass (full 0-1 UVs) that composites over the existing pixels by the material's blend mode. Nothing is cleared, saved or undoable, and render-target contents live on the GPU only, so keep them with create_static_texture_from_render_target or export_render_target. A missing render target or material is an error. drawn is false, and the call fails, when the engine skips the draw: for the full-screen pass a process that cannot render (-nullrhi, a commandlet) or a render target without a resource; for a rectangle a width or height that is not positive. For a texture use draw_texture_to_render_target.
| Parameter | Type | Required | Description |
|---|---|---|---|
render_target_path |
string | yes | Asset path of the destination render target |
material_path |
string | yes | Asset path of the UMaterialInterface to draw |
position |
string | no | Optional [x, y] destination position of a rectangle draw, default [0,0]; giving it (or size) switches to the canvas rectangle draw |
size |
string | no | Optional [w, h] destination size of a rectangle draw, defaults to the render target dimensions; giving it (or position) switches to the canvas rectangle draw |
Returns: { render_target_path: string, material_path: string, drawn: bool, position?: [number], size?: [number] }
draw_text_to_render_target¶
Destructive
Draw a string onto a UTextureRenderTarget2D asset in one canvas pass in the editor world, in the engine's medium font (no font choice), tinted by color and scaled by scale, with position the text's top-left in render-target pixels. The text blends over the existing pixels: nothing is cleared, saved or undoable, and render-target contents live on the GPU only, so keep them with create_static_texture_from_render_target or export_render_target. A missing render target is an error; drawn is false, and the call fails, when nothing was drawn (an empty text, or no engine font: font_resolved says whether one was found). Related: draw_texture_to_render_target, draw_line_to_render_target, clear_render_target.
| Parameter | Type | Required | Description |
|---|---|---|---|
render_target_path |
string | yes | Asset path of the destination render target |
text |
string | yes | Text to draw |
position |
string | no | Optional [x, y] text position, default [0,0] |
color |
string | no | Optional [r, g, b, a] text color, defaults to opaque white |
scale |
number | no | Optional uniform number or [x, y] scale, default 1 |
Returns: { render_target_path: string, text: string, drawn: bool, font_resolved: bool, position: [number] }
draw_texture_to_render_target¶
Destructive
Draw a texture as a rectangle onto a UTextureRenderTarget2D asset in one canvas pass in the editor world: position and size in render-target pixels from the top-left (size defaults to the whole target), full 0-1 UVs, tinted by color. It alpha-blends over the existing pixels: nothing is cleared, saved or undoable, and render-target contents live on the GPU only, so keep them with create_static_texture_from_render_target or export_render_target. A missing render target or texture is an error; drawn is false, and the call fails, when a width or height that is not positive draws nothing. For a material use draw_material_to_render_target with position and size.
| Parameter | Type | Required | Description |
|---|---|---|---|
render_target_path |
string | yes | Asset path of the destination render target |
texture_path |
string | yes | Asset path of the UTexture to draw, e.g. /Engine/EngineResources/WhiteSquareTexture |
position |
string | no | Optional [x, y] destination position, default [0,0] |
size |
string | no | Optional [w, h] destination size, defaults to render target dimensions |
color |
string | no | Optional [r, g, b, a] tint color, defaults to opaque white |
Returns: { render_target_path: string, texture_path: string, drawn: bool, position: [number], size: [number] }
evaluate_curve_at_time¶
Read-only
Sample a curve asset (UCurveFloat, UCurveVector or UCurveLinearColor) at one time without changing it: values holds every channel (1 for a float curve, 3 for a vector, 4 for a color as r,g,b,a), value the channel picks, and vector {x,y,z} or color {r,g,b,a} come with the multi-channel types. A time before the first key or after the last follows the curve's extrapolation. Use it to check what a curve yields at gameplay inputs after editing it; to see the authored keys use get_curve_keys and to add one add_curve_key; a curve table row: get_curve_table_info; an animation curve: get_anim_curve_data. A path that does not load as a curve, or a curve of another class, is an error.
| Parameter | Type | Required | Description |
|---|---|---|---|
curve_path |
string | yes | Asset path of the curve, as a package path ("/Game/Curves/C_Damage") or an object path ("/Game/Curves/C_Damage.C_Damage"). |
time |
number | yes | Time to sample at, on the curve's X axis in its own units, e.g. 0.5; any float, outside the keyed range too. |
channel |
number | no | Optional 0-based channel whose value fills the scalar value: 0-2 = x,y,z on a vector curve, 0-3 = r,g,b,a on a color curve (default 0; out of range falls back to 0, and channel reports the one used); ignored on a float curve. |
Returns: { curve_path: string, curve_class: string, time: float, curve_type: string, num_channels: int, channel: int, value: float, values: [float], vector?: {x,y,z}, color?: {r,g,b,a} }
export_render_target¶
Destructive
Export a render target to an image file on disk: PNG, except an RGBA16f or RGBA32f render target, which writes HDR when filename ends in .hdr and EXR otherwise. exported is measured on disk: the file must exist, hold bytes and have been written by this call. It is false, and the call fails saying why, for a render target without a resource (every render target in a process that cannot render: -nullrhi, a commandlet), an invalid path, a file that cannot be opened for writing, or an image that cannot be read back; an empty file left by a failed export is removed when the call created it.
| Parameter | Type | Required | Description |
|---|---|---|---|
render_target_path |
string | yes | Asset path of the render target to export |
output_directory |
string | yes | Absolute directory path to write into, created if missing |
filename |
string | yes | Output file name including extension, e.g. RT_Example.png |
Returns: { render_target_path: string, output_directory: string, filename: string, file_path: string, exported: bool, file_exists: bool, file_size_bytes: number }
find_assets_by_name¶
Read-only
Core tool: every client lists it by default.
Find assets by name across every mounted content root (/Game, /Engine, plugin mounts...): the broad "does anything called <token> exist, and where?" search, with each hit's name, object path, class and package.
Use it before reading or writing an asset whose path you do not know: a hit's path is what get_object_info, set_properties and save_asset take. Other searches: get_assets_in_folder for a folder, get_assets_by_type for a class, get_assets_by_tag for an Asset Registry tag, and resolve_asset_by_name for one exact name with all its homonyms.
Examples: {"search_pattern": "Grass"} finds every name that contains Grass, in any case; {"search_pattern": "BP_*", "case_sensitive": true} only names that start with BP_, in that case. match_mode in the reply says whether the pattern ran as a substring or a wildcard. For a broad token, lower max_results and read results_truncated; keep wait_for_scan on right after the editor opens, while the registry may still be loading.
| Parameter | Type | Required | Description |
|---|---|---|---|
search_pattern |
string | yes | Matched against the asset NAME. Contains no */? -> case-insensitive substring (FString::Contains). Contains * or ? -> glob (FString::MatchesWildcard), ANCHORED at both ends: * matches any run including empty, ? matches 0 or 1 character (UE semantics, not exactly 1). Not a regex. |
max_results |
integer | no | Cap on number of matched assets (1..50000); defaults to 1000. WARNING: Hitting the cap ABORTS the enumeration, so total_scanned then counts only the assets visited before the early-out, not the whole registry. |
case_sensitive |
boolean | no | When true, match is case-sensitive; defaults to false |
wait_for_scan |
boolean | no | When true (default), force-completes the AssetRegistry scan before enumerating so a still-loading registry cannot report total_scanned:0. Set false to skip the (possibly blocking) wait. |
Returns: { assets: [{ name, path, class, package, is_loaded }], count: int, total_scanned: int, scan_was_pending: bool, search_pattern: string, match_mode: "substring"|"wildcard", case_sensitive: bool, max_results: int, results_truncated: bool }
generate_asset_thumbnail¶
Additive
Render and cache an asset's thumbnail (or report the existing cached one), and write it to a PNG under <Project>/Saved/MCP/Thumbnails/. When the editor can render (FApp::CanEverRender() and the RHI is initialized), this generates a fresh thumbnail via ThumbnailTools and caches it into the package's thumbnail map. When rendering is unavailable, or the object type has no thumbnail renderer, it honestly reports the existing cached thumbnail state. file_path is set only when there is a thumbnail to write.
| Parameter | Type | Required | Description |
|---|---|---|---|
asset_path |
string | yes | Object path or package path of the asset. |
return_image |
boolean | no | Also return the thumbnail as an MCP image block next to this JSON (default true). |
Returns: { asset_path: string, object_path: string, asset_class: string, rendered: bool, has_thumbnail: bool, width: int, height: int, compressed_bytes: int, message: string, file_path?: string, image_returned?: bool, image_width?: int, image_height?: int, image_note?: string }
get_asset_by_name¶
Read-only
Retrieve ONE asset by exact name and return its identity (name, class, object path, package, is_loaded, file size) plus, with load_full_data, type-specific detail: a Blueprint's parent class / compile status / generated class, a StaticMesh's section-vertex-LOD counts, whether a material is an instance; with include_tags, its Asset Registry tags (the indexed key/value pairs an asset publishes -- parent class, mesh stats, fork-lineage tags) read without a load. WARNING: When the name is ambiguous it still resolves to the FIRST match and merely lists the rest in ambiguous_matches -- check that field, or use resolve_asset_by_name, which refuses to pick for you. The fallback name scan only covers /Game, so an /Engine or plugin-mount asset must be addressed by its full package or object path. Use get_assets_by_names for a batch, get_assets_by_tag to search BY a tag value, and find_assets_by_name when you only know part of the name.
| Parameter | Type | Required | Description |
|---|---|---|---|
asset_name |
string | yes | EXACT asset name, or a full package name ('/Game/Foo/BP_Foo') or object path ('/Game/Foo/BP_Foo.BP_Foo'); a path is tried first and is the only form that reaches outside /Game |
load_full_data |
boolean | no | When true (DEFAULT), LOADS the asset to add type-specific details (Blueprint parent class, mesh sections, ...). Pass false to stay metadata-only and avoid a synchronous load. |
include_tags |
boolean | no | Optional bool, default false: add tags, every Asset Registry tag of the asset as { name, value }, read from the registry without loading it. |
Returns: { name: string, class: string, path: string, package: string, is_loaded: bool, file_size_bytes?: int, file_size_kb?: number, parent_class?: string, is_compiled?: bool, is_valid?: bool, generated_class?: string, num_sections?: int, num_vertices?: int, num_lods?: int, is_material_instance?: bool, tags?: [{ name: string, value: string }], ambiguous_matches?: [string] }
get_asset_dependencies_recursive¶
Read-only
Walk an asset's package dependencies through the Asset Registry, breadth-first and deduplicated, down to max_depth levels, without loading or changing anything: every package it needs directly (depth 1) or through others, each listed once with the depth where it was first reached, /Script/ packages included. Use it for what an asset drags in with it (migration, cooking, memory); for direct dependencies only, with class and loaded state, use get_asset_dependencies; for who uses an asset get_asset_referencers; for the chain between two assets get_reference_path; for loops check_asset_circular_dependency. An asset the registry does not know gives count 0 rather than an error; a path that is not a valid long package name is an error. Deep walks on a large project return thousands of packages, so start with a low max_depth.
| Parameter | Type | Required | Description |
|---|---|---|---|
asset_path |
string | yes | Root asset, as a package path ("/Game/Characters/BP_Hero") or an object path ("/Game/Characters/BP_Hero.BP_Hero"). |
max_depth |
number | no | Levels to walk, 1 = direct dependencies only (1..32, default 3; a value outside the range is clamped). |
dependency_type |
string | no | Optional "hard"|"soft"|"all" (case-insensitive, default "all"): hard keeps only references loaded with the asset, soft only soft-object references, at every level; any other value counts as "all". |
Returns: { asset_path: string, package_name: string, max_depth: int, dependency_type: string, dependencies: [{path, depth}], count: int }
get_asset_file_info¶
Read-only
Stat an asset's package file on disk without loading the asset: its size in bytes, KB and MB, its last-modified timestamp (formatted string + Unix epoch) with its age in days and hours, and the absolute file path it resolved to (.uasset, else .umap for a level, which extension names) -- the measurement for a disk-budget question ("what is costing the 491 MB in this import?") and the disk-side oracle for a save whose return value claimed success. A package or object path is stat'ed even when the Asset Registry has no entry for it; a bare name resolves like get_asset_by_name (a /Game-only exact-name scan, first hit wins with the rest in ambiguous_matches). A package with no file on disk, one never saved for instance, is a success with file_exists=false, file_size_bytes 0 and a message. WARNING: Size is NOT a proxy for content or integrity: a DataTable that GREW by 5 KB had lost 46 of its 48 references. To measure content use get_data_table_info, get_data_table_row with include_export_text or get_asset_dependencies; for in-memory cost use get_asset_memory_usage. It is a FILE timestamp: an asset edited in memory but not saved reports its old size and date, and Unreal does not tell creation from modification. Use list_assets_modified_since to sweep a whole folder by date, and list_dirty_packages for unsaved-in-memory changes.
| Parameter | Type | Required | Description |
|---|---|---|---|
asset_name |
string | yes | EXACT asset name, or a full package name ('/Game/Maps/L_Main') or object path ('/Game/Foo/BP_Foo.BP_Foo'); a path is tried first, is the only form that reaches outside /Game, and is stat'ed even when the Asset Registry does not list it |
Returns: { asset_name: string, asset_path: string, asset_class?: string, package_name: string, file_path: string, extension: string, file_exists: bool, file_size_bytes: int, file_size_kb?: number, file_size_mb?: number, last_modified?: string, last_modified_timestamp?: int, age_days?: number, age_hours?: number, message?: string, ambiguous_matches?: [string] }
get_asset_import_data¶
Read-only
Read the source-file record (UAssetImportData) of an asset loaded by path: the file(s) it was imported from, as stored and resolved to absolute paths, with each file's import timestamp. Works for textures, sound waves and any class with an AssetImportData property (static and skeletal meshes, animation sequences). An asset that has none is a success with has_import_data=false, empty source_file and source_files, source_file_count 0 and no import_time. source_file is the first resolved file and import_time the first file's timestamp. Read-only: the asset is loaded if needed, not changed. An asset that does not load is an error. Interchange pipelines and node data: get_interchange_asset_import_data; reimport from the recorded file: reimport_asset or reimport_interchange_asset.
| Parameter | Type | Required | Description |
|---|---|---|---|
asset_path |
string | yes | Asset path in object form, e.g. "/Game/Imported/T_Rock.T_Rock", or package form "/Game/Imported/T_Rock". |
Returns: { asset_path: string, asset_class: string, has_import_data: bool, source_file: string, source_files: [{relative_filename, resolved_filename, import_time}], source_file_count: int, import_time?: string }
get_asset_metadata_tags¶
Read-only
Reads all editor metadata tags (UMetaData) of an asset. Wraps UEditorAssetLibrary::GetMetadataTagValues and returns each tag as a {key, value} pair. (Distinct from get_asset_by_name with include_tags, which reads Asset Registry tags instead of the asset's stored metadata tags.)
| Parameter | Type | Required | Description |
|---|---|---|---|
asset_path |
string | yes | /Game path to the asset. |
Returns: { asset_path: string, tags: [{ key: string, value: string }], tag_count: number }
get_asset_thumbnail¶
Read-only
Report whether an asset is of a type that CAN carry a thumbnail, alongside its resolved object path, class and loaded state. WARNING: has_thumbnail is a CLASS test, not a lookup of stored thumbnail bytes: it is true for any StaticMesh, Material, Texture, Blueprint, SkeletalMesh or Level and false for everything else, whether or not a thumbnail was ever rendered -- and it returns no image data at all. To actually see something rendered, use generate_asset_thumbnail or capture_viewport. Resolution matches get_asset_by_name (full package name first, then a /Game-only exact-name scan, first hit wins with the rest in ambiguous_matches).
| Parameter | Type | Required | Description |
|---|---|---|---|
asset_name |
string | yes | EXACT asset name, or a full package name (which is tried first and is the only form that reaches outside /Game) |
Returns: { asset_name: string, asset_path: string, has_thumbnail: bool, asset_class: string, asset_loaded: bool, asset_class_name?: string, ambiguous_matches?: [string] }
get_assets_by_names¶
Read-only
Batch variant of get_asset_by_name: resolve N asset names in ONE round-trip instead of N calls, returning per entry a found flag plus that asset's identity (class, object path, package, is_loaded), its Asset Registry tags with include_tags, or the error that stopped it. Delegates to get_asset_by_name literally, so it inherits both its /Game-only fallback scan and its ambiguous_matches transparency -- an ambiguous name still resolves to the first hit, so check that field per entry. max_results caps how many entries are processed.
| Parameter | Type | Required | Description |
|---|---|---|---|
asset_names |
array | yes | Array of exact asset names, full package names or object paths to resolve (required) |
load_full_data |
boolean | no | When true, adds the type-specific details of get_asset_by_name per asset. Defaults to FALSE here -- the opposite of the single-asset tool -- so a batch call cannot accidentally force N synchronous loads. |
include_tags |
boolean | no | Optional bool, default false: add each found asset's Asset Registry tags [{ name, value }], as get_asset_by_name include_tags does. |
max_results |
integer | no | Optional safety cap on how many array entries get processed (1..5000); omitted processes every entry. Entries past the cap are dropped and results_truncated goes true. |
Returns: { requested_count: int, processed_count: int, results_truncated: bool, resolved: [{ asset_name, found: bool, name?, class?, path?, package?, is_loaded?, tags?, ambiguous_matches?, error?, ... (same fields as get_asset_by_name when found) }] }
get_assets_by_tag¶
Read-only
Search assets BY an Asset Registry tag (FARFilter::TagsAndValues), server-side and metadata-only -- it never force-loads anything. This is the only tool here that queries by tag rather than by name, path or type: "every asset carrying the fork-origin tag (mcp.forkOrigin by default)", "every Blueprint whose ParentClass tag is X". It is also the general-class search that get_assets_by_type cannot do, since class_filter resolves ANY class (with subclasses) instead of five hardcoded ones. Search by class alone by pairing class_filter with a tag every asset of that class publishes; use get_asset_by_name with include_tags to read the tags OF one asset rather than search by them.
| Parameter | Type | Required | Description |
|---|---|---|---|
tag_name |
string | yes | Asset Registry tag name to filter on, e.g. "ParentClass" or "mcp.forkOrigin" (required). Read the available tag names off a sample asset with get_asset_by_name include_tags=true. |
tag_value |
string | no | When given, only assets whose tag equals this value EXACTLY match; when omitted, matches any asset that HAS the tag with any value |
folder_path |
string | no | Root package path to search under; defaults to "/Game", so /Engine, /Water and plugin mounts need their root passed explicitly |
recursive |
boolean | no | When true (DEFAULT), recurse into subfolders |
class_filter |
string | no | Optional class short name or /Script path (e.g. "Blueprint", "/Script/Engine.DataTable") to additionally constrain the match; subclasses match too (bRecursiveClasses) |
max_results |
integer | no | Cap on number of returned assets (1..50000); defaults to 1000. total_found is the uncapped count. |
Returns: { tag_name: string, tag_value: string, folder_path: string, recursive: bool, class_filter: string, assets: [{ name, path, class, package }], count: int, total_found: int, max_results: int, results_truncated: bool }
get_assets_by_type¶
Read-only
List every asset of a CLASS under a content path, with name, object path, class, package and is_loaded, plus total_found and results_truncated. Takes any resolvable class -- "DataTable", "NiagaraSystem", "LandscapeGrassType", a "/Script/Module.Class" path -- matched WITH its subclasses, plus five shortcuts kept for convenience: "Blueprint", "StaticMesh", "Texture" (Texture2D exactly), "Sound" (SoundWave exactly) and "Material", which is the one that earns its keep by grouping Material + MaterialInstanceConstant + MaterialInstanceDynamic. Searches /Game by default and any mount via package_path (/Engine, /Water, plugin content). Sister tools: get_assets_in_folder to enumerate a directory whatever the class, find_assets_by_name to search by NAME, get_assets_by_tag to search by an Asset Registry tag.
| Parameter | Type | Required | Description |
|---|---|---|---|
asset_type |
string | yes | A class name ("DataTable"), a "/Script/Module.Class" path, or one of the shortcuts Blueprint | StaticMesh | Material | Texture | Sound. A name that resolves to no class is an error, not an empty result. WARNING: The shortcuts match those classes EXACTLY (Texture finds Texture2D but not TextureCube); any other name matches the class AND its subclasses. |
package_path |
string | no | Content root to search, recursively. Defaults to "/Game"; pass "/Engine", "/Water", a plugin mount or a subfolder to look elsewhere. |
max_results |
integer | no | Cap on number of returned assets (1..50000); defaults to 1000. total_found is the uncapped count. |
Returns: { assets: [{ name, path, class, package, is_loaded }], count: int, total_found: int, asset_type: string, package_path: string, max_results: int, results_truncated: bool }
get_assets_in_folder¶
Read-only
Enumerate every asset under a content FOLDER (recursively by default), each with name, object path, class, package and is_loaded, plus total_found so you can tell a truncated listing from a complete one. The "what is actually in this directory?" inventory -- metadata only, it never loads an asset. Reaches any mounted content root, not just /Game. Pick this over find_assets_by_name when you know WHERE to look rather than what the name contains, over get_assets_by_type when you want everything regardless of class, and over resolve_asset_by_name when you do not have an exact name at all.
| Parameter | Type | Required | Description |
|---|---|---|---|
folder_path |
string | yes | Folder to list. A bare/relative name is prefixed with /Game/; a path already starting with "/" (e.g. /Water/Materials, /Engine/..., /<PluginName>/...) is used verbatim, so every mounted content root is reachable. |
max_results |
integer | no | Cap on number of returned assets (1..50000); defaults to 1000. Compare count against total_found (which is NOT capped) to see how much was left out. |
recursive |
boolean | no | When true (DEFAULT), include subfolders; false lists only the assets sitting directly in this folder |
Returns: { assets: [{ name, path, class, package, is_loaded }], count: int, total_found: int, folder_path: string, recursive: bool, max_results: int, results_truncated: bool }
get_collection_assets¶
Read-only
List the object paths of the assets directly in one Content Browser collection (child collections are not included), without changing anything. The collection is looked up by collection_name within share_type, default Local; an unrecognized share_type also falls back to Local, and a name not found under that share type is an error. get_collections lists every collection with its share_type. Returns assets and asset_count; change membership with add_asset_to_collection or remove_asset_from_collection.
| Parameter | Type | Required | Description |
|---|---|---|---|
collection_name |
string | yes | Name of the (existing) collection. |
share_type |
string | no | ECollectionShareType: "Local", "Private", or "Shared" (optional, default "Local") |
Returns: { collection_name: string, share_type: string, assets: [string], asset_count: number }
get_collections¶
Read-only
List every Content Browser collection of the project container, of every share type, without changing anything: name and share_type of each (the share_type that get_collection_assets and the other collection tools need), plus collection_count. Errors when the collection manager is unavailable.
No parameters.
Returns: { collections: [{ name: string, share_type: string }], collection_count: number }
get_reference_path¶
Read-only
Find the shortest reference CHAIN through the AssetRegistry dependency graph: with from, the shortest from -> ... -> target (walking dependencies); without from, the shortest chain from a root (a package nothing references) DOWN to target (walking referencers) -- i.e. 'what keeps target alive / why is it undeletable'. get_asset_referencers gives the direct edges; this gives the PATH.
| Parameter | Type | Required | Description |
|---|---|---|---|
target |
string | yes | The asset whose reference chain to trace (object path or /Game package path). |
from |
string | no | Optional starting hub/root asset; when set, traces from -> target via dependencies instead of the referencer-root chain. |
max_depth |
number | no | Max chain depth to search (optional, default 16; clamped 1..64). |
dependency_type |
string | no | Optional "hard"|"soft"|"all" (case-insensitive, default "all"). Filters BOTH BFS directions (the from->target dependency walk and the referencer-root walk) and the always-computed direct_referencers list via the AssetRegistry hard/soft FDependencyQuery split; "all" leaves them unfiltered. |
Returns: { target: string, target_package: string, from: string, dependency_type: string, found: bool, reached_root: bool, chain: [string], chain_length: int, direct_referencers: [string], direct_referencer_count: int, message: string }
get_render_target_info¶
Read-only
Read the metadata of a render target asset without reading pixels or changing it, for every render-target class: render_target_class, pixel_format and is_srgb always; a UTextureRenderTarget2D adds width, height and format (RTF_*); a UTextureRenderTarget2DArray adds width, height, slices and is_hdr; a UTextureRenderTargetCube adds size (face edge), num_mips, is_hdr and auto_generate_mips; any other render-target class adds width and height. export_render_target writes the image to disk.
| Parameter | Type | Required | Description |
|---|---|---|---|
render_target_path |
string | yes | Asset path of the render target, e.g. /Game/RenderTargets/RT_Example |
Returns: { render_target_name: string, asset_path: string, render_target_class: string, pixel_format: string, is_srgb: bool, width?: int, height?: int, format?: string, slices?: int, size?: int, num_mips?: int, is_hdr?: bool, auto_generate_mips?: bool }
get_static_mesh_info¶
Read-only
Get detailed info about a static mesh without changing it: LODs, verts, materials (with slots), every socket with its transform and tag, nanite, collision, bounds, and the asset-level lightmap settings (lightmap_resolution, the texel resolution static lighting is baked at, and lightmap_coordinate_index, the UV channel holding the lightmap UVs; an override on a placed component is not read). A mesh that does not load is an error. Per-section flags are get_static_mesh_sections.
| Parameter | Type | Required | Description |
|---|---|---|---|
static_mesh_path |
string | yes | Package or object path of the UStaticMesh asset, e.g. "/Game/Meshes/SM_Crate". |
Returns: { static_mesh_path, num_lods, num_verts_lod0, num_materials, num_sockets, materials: [{slot_index, slot_name, material_path}], sockets: [{name, location:{x,y,z}, rotation:{pitch,yaw,roll}, scale:{x,y,z}, tag}], collision_complexity, nanite_enabled, lightmap_resolution, lightmap_coordinate_index, bounds_origin_x, bounds_origin_y, bounds_origin_z, bounds_extent_x, bounds_extent_y, bounds_extent_z, sphere_radius }
get_static_mesh_sections¶
Read-only
List every section of every render LOD of a UStaticMesh asset, loaded from its package or object path, without changing it: lod_index, section_index and the cast_shadow, collision_enabled and visible_in_ray_tracing flags of each, read through the StaticMeshEditor subsystem. A mesh without render data has no LODs and returns an empty list; a mesh that does not load, or a missing subsystem, is an error. total_sections counts the rows. Material slots, vertex counts, sockets, bounds and lightmap settings are get_static_mesh_info; skeletal meshes use get_skeletal_mesh_section_info.
| Parameter | Type | Required | Description |
|---|---|---|---|
static_mesh_path |
string | yes | Package or object path of the UStaticMesh, e.g. "/Game/Meshes/SM_Crate". |
Returns: { static_mesh_path: string, sections: [{ lod_index: number, section_index: number, cast_shadow: bool, collision_enabled: bool, visible_in_ray_tracing: bool }], total_sections: number }
get_texture_info¶
Read-only
Reads the metadata of a UTexture2D or UTexture2DArray asset without changing it; texture_class says which. A UTexture2D reports its size, pixel format, sRGB, compression, LOD group, sampler/LOD settings (address, filter, mip-gen, LOD bias, max size, flip-green), mip count and source; a UTexture2DArray reports its slice size as width/height, num_slices, format, num_mips and source_texture_count. texture_path accepts short or fully-qualified "/Game/MyGame/T_Example.T_Example" asset paths.
| Parameter | Type | Required | Description |
|---|---|---|---|
texture_path |
string | yes | Asset path of the texture or texture array (e.g. "/Game/MyGame/T_Example" or fully-qualified "/Game/MyGame/T_Example.T_Example") |
Returns: { texture_name: string, asset_path: string, texture_class: string, width: int, height: int, format: string, num_mips: int, has_source: bool, srgb?: bool, compression?: string, lod_group?: string, address_x?: string, address_y?: string, filter?: string, mip_gen_settings?: string, lod_bias?: int, max_texture_size?: int, flip_green?: bool, source_width?: int, source_height?: int, source_format?: string, num_slices?: int, source_texture_count?: int }
import_sound_file¶
Destructive
Import an external WAV file into a USoundWave asset. Uses the legacy USoundFactory (AudioEditor module) path, no Interchange. The new sound wave is saved to disk and verified by loading it back; the response reports the resulting asset_path, duration (seconds) and num_channels.
| Parameter | Type | Required | Description |
|---|---|---|---|
file_path |
string | yes | Absolute path to the source .wav on disk. |
package_path |
string | yes | Destination content folder, e.g. /Game/Imported. |
asset_name |
string | no | Optional destination asset name (default = source file stem). |
replace_existing |
boolean | no | Optional bool, default true: overwrite an asset already at the destination. false refuses with an error when the destination already holds an asset. |
Returns: { file_path: string, package_path: string, asset_path: string, asset_name: string, duration: float, num_channels: int, imported: bool }
import_texture_file¶
Destructive
Import an external image file into a UTexture2D asset. Uses the legacy UTextureFactory path inline (no Interchange, no IAssetTools::ImportAssets, which asserts when re-entered from the engine tick). Images only -- png/jpg/jpeg/bmp/tga/dds/exr/hdr/tif/tiff/psd/pcx: any other extension is refused before anything is touched (import_sound_file for .wav, import_landscape_heightmap for terrain, import_interchange_asset for FBX/glTF meshes). The new texture is saved to disk and verified by loading it back; the response reports the resulting asset_path, width and height.
| Parameter | Type | Required | Description |
|---|---|---|---|
file_path |
string | yes | Absolute path to the source image on disk; its existence is checked before any work starts. |
package_path |
string | yes | Destination content folder, e.g. /Game/Imported. Must start with '/'. |
asset_name |
string | no | Optional destination asset name (default = source file stem). |
replace_existing |
boolean | no | Optional bool, default true: overwrite an asset already at the destination. false refuses with an error when the destination already holds an asset. |
Returns: { file_path: string, package_path: string, asset_path: string, asset_name: string, width: int, height: int, imported: bool }
ingest_external_uassets¶
Destructive
Copy .uasset/.uexp/.ubulk/.umap from an EXTERNAL Content tree into THIS project, preserving each file's path relative to its Content root, then register the new packages with IAssetRegistry::ScanPathsSynchronous(bForceRescan) and sweep object redirectors under the destination. Fills the gap that migrate_assets only EXPORTS and import_texture_file is image-only. HEAVY: touches project Content on disk + mutates the registry -- run with confirmation.
| Parameter | Type | Required | Description |
|---|---|---|---|
source_dir |
string | yes | External source directory (its Content ancestor defines the preserved relative path; if none, source_dir itself is the root). |
dest_root |
string | no | Destination content mount path (optional, default '/Game'); e.g. '/Game/MyGame/Imported'. |
paths |
array | no | Optional list of relative sub-paths (relative to the Content root) to restrict the copy to; empty/absent = whole tree. |
overwrite |
boolean | no | Optional bool (default false). When false, destination files that already exist are skipped. |
fixup_redirectors |
boolean | no | Optional bool (default true). Resolve + leave-fixed object redirectors under dest_root after the copy. |
Returns: { source_dir: string, content_root: string, dest_root: string, dest_dir: string, files_copied: int, files_skipped: int, files_failed: int, scanned_paths: [string], redirectors_fixed: int, copied: [{src, dest, package_path}], message: string }
list_assets_modified_since¶
Read-only
List package files (.uasset/.umap) under a content path whose ON-DISK mtime is newer than a timestamp -- the find -newermt recipe for isolating an UE Migrate set or a session's changes, but returning /Game package names. Enumerates the filesystem (so it catches just-migrated assets the registry may not have indexed yet).
| Parameter | Type | Required | Description |
|---|---|---|---|
timestamp |
string | yes | Cutoff time; ISO-8601 (e.g. '2024-07-15T00:00:00Z') or an FDateTime-parseable string. Assets with mtime strictly greater are returned. |
path |
string | no | Content path to scan (optional, default '/Game'), e.g. '/Game/MyGame'. |
limit |
number | no | Max entries to return, newest first (optional, default 500; clamped 1..5000). |
Returns: { path: string, dir: string, since: string, count: int, truncated: bool, total_matched: int, assets: [{package_name, file_path, modified, size_bytes}], message: string }
reimport_asset¶
Destructive
Reimport an asset from the source file it was imported from (texture, sound, mesh or anything with UAssetImportData), through the legacy FReimportManager handlers, fully automated with no dialogs, overwriting the asset's content in memory with the file's current content. The asset is marked dirty but not saved: save it with save_asset. It cannot be undone. Use it after the source file changed on disk; for assets imported through Interchange pipelines use reimport_interchange_asset; to see the recorded source file first use get_asset_import_data; to bring in a new file use import_texture_file or import_sound_file. success is true only when the asset was reimported. It is false, with reimported false and the reason, when no legacy handler accepts the asset (can_reimport false), when no source file is recorded, when a recorded file is missing on disk (missing_files; refused before the reimport, which can crash the editor then, so nothing changes), or when the handler reports a failure. source_validated says the recorded files were found. Repeating it reimports again. An asset that does not load is an error.
| Parameter | Type | Required | Description |
|---|---|---|---|
asset_path |
string | yes | Asset path in object form, e.g. "/Game/Imported/T_Rock.T_Rock" (package form "/Game/Imported/T_Rock" also loads). |
Returns: { asset_path: string, can_reimport: bool, reimported: bool, source_validated: bool, source_files: [string], missing_files?: [string] }
remove_asset_from_collection¶
Destructive Idempotent
Removes an asset from a collection and reads back its object count (idempotent; inverse of add_asset_to_collection). If the asset is already absent from the collection a stable payload is returned (already_absent=True). must match the share type the collection was created with.
| Parameter | Type | Required | Description |
|---|---|---|---|
collection_name |
string | yes | Name of the (existing) collection. |
asset_path |
string | yes | /Game path / object path of the asset to remove. |
share_type |
string | no | ECollectionShareType: "Local", "Private", or "Shared" (optional, default "Local") |
Returns: { collection_name: string, share_type: string, asset_path: string, removed: bool, already_absent: bool, verified: bool, object_count: number }
remove_asset_metadata_tag¶
Destructive
Remove one string metadata tag (UMetaData) from an asset and save it (UEditorAssetLibrary::RemoveMetadataTag); no undo step, since package metadata is outside the undo history, and refused by the engine during PIE (the tag stays, reported as an error). Inverse of set_asset_metadata_tag. A key the asset has no tag for is an honest no-op (removed=false, nothing saved); an asset that does not exist is an error. The reply re-reads the tags (still_present, tag_count). Read: get_asset_metadata_tags.
| Parameter | Type | Required | Description |
|---|---|---|---|
asset_path |
string | yes | /Game path to the asset (e.g. "/Game/MyGame/M_Example"). |
key |
string | yes | Metadata tag name (FName) to remove, e.g. "Author". |
Returns: { asset_path: string, key: string, removed: bool, still_present: bool, tag_count: int, saved: bool }
remove_static_mesh_socket¶
Destructive Idempotent
Remove one socket, found by name, from a UStaticMesh asset loaded from its package or object path, then save the mesh; there is no undo transaction. A name the mesh does not have is a success with removed=false, and nothing is touched or saved (idempotent). A mesh that does not load is an error, and so is a failed save -- refused while PIE runs or under a read-only root -- after which the socket is already gone from the mesh in memory. socket_count is the number of sockets left. List sockets with get_static_mesh_info, add one with add_static_mesh_socket, rename one with rename_static_mesh_socket; skeletal meshes use remove_skeletal_mesh_socket and skeletons remove_skeleton_socket.
| Parameter | Type | Required | Description |
|---|---|---|---|
static_mesh_path |
string | yes | Package or object path of the UStaticMesh, e.g. "/Game/Meshes/SM_Crate". |
socket_name |
string | yes | Name of the socket to remove, compared as an FName (case-insensitive). |
Returns: { static_mesh_path, socket_name, removed, socket_count, saved?, save_error? } -- removed is read back (the socket is no longer in the mesh's list)
rename_assets¶
Destructive
Rename/move multiple assets in one IAssetTools::RenameAssets batch, with per-item disk verification instead of the batch bool. Guards: refuses while PIE is active; refuses paths under readonly_roots (default: the project's Read Only Content Roots setting) on BOTH the source and the destination; pre-detects the native-CDO reference case that makes the engine's FMessageDialog auto-cancel the whole batch (would_block_on_modal) and does NOT call RenameAssets in that case. Also reports referencer packages left DIRTY -- PerformAssetRename discards its FailedPackages list unless UE source control is connected, so a referencer (typically OFPA) can be left unwritten while RenameAssets still returns true.
| Parameter | Type | Required | Description |
|---|---|---|---|
assets |
array | yes | List of rename descriptors: { old_path (required), new_name (optional, default = current name), new_folder (optional, default = current folder) }. |
dry_run |
boolean | no | Optional bool (default false). Plan + run every guard and the CDO scan, but never call RenameAssets. |
readonly_roots |
array | no | Optional array of long paths that must not be renamed FROM or INTO (default: the project's Read Only Content Roots setting). Pass [] to disable the guard. |
allow_cdo_referenced |
boolean | no | Optional bool (default false). When false, a native-CDO reference to any asset in the batch refuses the batch instead of letting it silently no-op. |
Returns: { dry_run: bool, readonly_roots: [string], readonly_roots_explicit: bool, planned_count: int, renamed_count: int, failed_count: int, skipped_count: int, batch_api_result: bool|null, would_block_on_modal: bool, cdo_references: [object], soft_scan_is_approximate: bool, referencer_packages_dirty: [object], results: [object] }
rename_static_mesh_socket¶
Destructive Idempotent
Rename an existing static mesh socket (guards against name collisions; idempotent).
| Parameter | Type | Required | Description |
|---|---|---|---|
static_mesh_path |
string | yes | Content path to the UStaticMesh asset. |
socket_name |
string | yes | Current name of the socket to rename. |
new_name |
string | yes | New name for the socket. |
Returns: { static_mesh_path, old_name, new_name, renamed, already_named?, socket_count, saved, save_error? } -- renamed is read back (new_name resolves to the socket)
resolve_asset_by_name¶
Read-only
Resolve an exact asset name (or path) to EVERY matching asset and report match_count + unambiguous, instead of silently picking the first one the way get_asset_by_name, get_blueprint_parent, get_graph_nodes and the rest of the by-name tools do. Run this FIRST whenever you are about to address an asset by bare name: a project can have hundreds of duplicate names (the same name in a vendored pack and in the game's own folders, plus dated backup copies), and unambiguous:false is the only warning you will get before another tool hands you a stale backup's contents as if they were the real asset. From there, pass the full path everywhere. match_count:0 with success:true is a valid, informative answer -- it means "no asset with this exact name", which is a real measurement of non-existence (unlike find_assets_by_name's count:0, which can just mean the pattern had a wildcard in it).
| Parameter | Type | Required | Description |
|---|---|---|---|
asset_name |
string | yes | EXACT bare asset name or full package/asset path. This is an equality test, not a substring one -- use find_assets_by_name when you only know part of the name. |
class_filter |
string | no | Optional class short name or /Script path (e.g. "Blueprint", "DataTable") to constrain the match; matches subclasses too |
search_root |
string | no | Root package path for the fallback scan used when asset_name is not an exact package-name hit; defaults to "/Game", so an asset under /Engine or a plugin mount needs its root passed here explicitly |
Returns: { asset_name: string, search_root: string, class_filter: string, match_count: int, unambiguous: bool, matches: [{ path, package, class }] }
scan_uasset_references¶
Read-only
Lightweight BINARY scan of a .uasset/.umap on disk (NO editor load): tokenizes the raw package bytes and reports the referenced-asset-path tokens (/Game//Engine//Script) plus, optionally, tokens matching a regex pattern. A quick way to compare copies of one asset: an incomplete (stub) copy shows far fewer reference tokens than the complete one. Accepts a disk path OR a /Game|/Engine mount path.
| Parameter | Type | Required | Description |
|---|---|---|---|
package_file |
string | yes | Absolute .uasset/.umap path on disk, or a /Game|/Engine mount path. |
pattern |
string | no | Optional regex (ECMAScript); tokens containing a match are counted in the 'matches' fields. |
Returns: { package_file: string, resolved_path: string, exists: bool, file_size_bytes: number, modified: string, pattern: string, ref_path_unique: int, ref_path_occurrences: number, ref_paths: [{token, count}], match_unique: int, match_occurrences: number, matches: [{token, count}] }
set_asset_metadata_tag¶
Destructive Idempotent
Sets (or overwrites) a string metadata tag on an asset and saves it. The asset is loaded, UEditorAssetLibrary::SetMetadataTag is applied, the owning package is saved, and the value is read back to verify. Inverse: remove_asset_metadata_tag.
| Parameter | Type | Required | Description |
|---|---|---|---|
asset_path |
string | yes | /Game path to the asset (e.g. "/Game/MyGame/M_Example"). |
key |
string | yes | Metadata tag name (FName), e.g. "Author". |
value |
string | yes | String value to associate with the tag. |
Returns: { asset_path: string, key: string, value: string, read_back: string, tag_set: bool, verified: bool, saved: bool }
set_static_mesh_collision_complexity¶
Destructive Idempotent
Set the collision complexity (BodySetup CollisionTraceFlag) of a UStaticMesh asset, creating its BodySetup when missing, then save it; a failed save is an error. An unrecognized complexity silently becomes default, so check collision_complexity, which is read back.
| Parameter | Type | Required | Description |
|---|---|---|---|
static_mesh_path |
string | yes | Content path to the UStaticMesh asset. |
complexity |
string | yes | One of "default", "simple_and_complex", "simple_as_complex", "complex_as_simple", case-insensitive; any other value is stored as default. |
Returns: { static_mesh_path, collision_complexity, applied, saved, save_error? }
set_static_mesh_lightmap¶
Destructive Idempotent
Sets the lightmap resolution and/or the lightmap UV channel index stored on a static mesh asset, in one undo step, then saves the asset; success is false, with save_error, when the save fails. Only those two properties change: the mesh is not rebuilt and no lighting is rebuilt, so baked lighting picks the values up on the next build_lighting. The values are stored as given, without range checks, and read back into the reply; repeating a call with the same values saves again with the same result. Placed actors that override their own lightmap resolution keep their override. Passing neither value is an error and nothing changes. Read the current values with get_static_mesh_info; check which UV channels exist, and which one is the lightmap, with list_uv_channels and its layout with get_uv_health_report.
| Parameter | Type | Required | Description |
|---|---|---|---|
static_mesh_path |
string | yes | Package or object path of the UStaticMesh asset (e.g. "/Game/Props/SM_Crate"). |
lightmap_resolution |
integer | no | Optional lightmap texture size in texels per side, a whole number such as 64, 128 or 256 (powers of two are the usual choice); omitted, it stays as it is. |
lightmap_coordinate_index |
integer | no | Optional 0-based UV channel the lightmap uses (typically 1); it should name a channel the mesh has (list_uv_channels), since it is not checked. Omitted, it stays as it is. |
Returns: { static_mesh_path, lightmap_resolution, lightmap_coordinate_index, applied_count, saved, save_error? }
set_static_mesh_material_slot¶
Destructive Idempotent
Assign a material to one existing material slot of a UStaticMesh asset, picked by zero-based material_index, then save the mesh. This edits the asset, so every component without its own override of that slot shows the new material. The slot array never grows: an index outside the existing slots is an error, as is a mesh or material path that does not load. No undo transaction and no same-material check, so a repeat call writes and saves the slot again (idempotent). A failed save -- refused while PIE runs, under a read-only root, or a read-only file -- is an error, with the material already set in memory. material_path is read back. Slots: get_static_mesh_info; per-actor override: set_actor_material; skeletal meshes: set_skeletal_mesh_material_slot; a Blueprint component template: apply_material_to_blueprint.
| Parameter | Type | Required | Description |
|---|---|---|---|
static_mesh_path |
string | yes | Content path to the UStaticMesh asset. |
material_index |
integer | yes | Zero-based index of an existing material slot. |
material_path |
string | yes | Content path to the UMaterialInterface to assign. |
Returns: { static_mesh_path, material_index, material_path, applied, saved, save_error? } -- applied is false, and the call fails, when the slot reads back another material
set_static_mesh_nanite¶
Destructive Idempotent
Set the Nanite settings of a UStaticMesh asset through the StaticMeshEditor subsystem, which rebuilds the mesh, then save it; a failed save is an error. Both fields are always written: omitting enabled disables Nanite and omitting keep_percent_triangles resets it to 1.0. nanite_enabled and keep_percent_triangles are read back; applied is false, and the call fails, when either differs from the request.
| Parameter | Type | Required | Description |
|---|---|---|---|
static_mesh_path |
string | yes | Content path to the UStaticMesh asset. |
enabled |
boolean | no | true enables Nanite, false disables it; default false, so leaving it out disables Nanite. |
keep_percent_triangles |
number | no | Fraction of the source triangles Nanite keeps, 1.0 keeps them all (default 1.0, written even when omitted). |
Returns: { static_mesh_path, nanite_enabled, keep_percent_triangles, applied, saved, save_error? }
set_static_mesh_socket_transform¶
Destructive Idempotent
Move, rotate or scale an existing socket of a UStaticMesh asset relative to the mesh, writing only the fields given (the others keep their value), in one undo step (undo restores the old transform), then save the mesh. The reply reads back the socket's whole transform. Use it to adjust a socket that add_static_mesh_socket created; to rename one use rename_static_mesh_socket, to delete one remove_static_mesh_socket, to see every socket get_static_mesh_info; skeletal mesh sockets have their own tools. A socket_name the mesh does not have is not an error: updated is false and nothing is touched or saved. A mesh that does not load, or a location, rotation or scale that is not three numbers, is an error before anything changes; a failed save (for example while PIE runs) is an error too, with the new transform already on the mesh in memory. The same values again rewrite them and save.
| Parameter | Type | Required | Description |
|---|---|---|---|
static_mesh_path |
string | yes | Package or object path of the UStaticMesh, e.g. "/Game/Meshes/SM_Crate". |
socket_name |
string | yes | Name of the existing socket, compared as an FName (case-insensitive), as get_static_mesh_info lists it. |
location |
array | no | New relative location [x, y, z] in cm from the mesh origin, e.g. [0, 0, 50] (optional). |
rotation |
array | no | New relative rotation [pitch, yaw, roll] in degrees, e.g. [0, 90, 0] (optional). |
scale |
array | no | New relative scale [x, y, z] as multipliers, e.g. [1, 1, 1] (optional). |
Returns: { static_mesh_path, socket_name, updated, location:{x,y,z}, rotation:{pitch,yaw,roll}, scale:{x,y,z}, saved, save_error? } -- updated is read back (each given field matches the socket)