editor_toolset.toolsets.asset.AssetTools¶
Provides tools for interacting with assets in the Unreal project and files on disk.
21 tool(s).
editor_toolset.toolsets.asset.AssetTools.can_edit_asset¶
Checks whether an asset can be edited.
Args:
asset_path: Content path to the asset.
Returns:
True if the asset can be edited, False if it is checked out
or locked by another user in source control. Always True
when source control is not enabled.
Input schema
{
"properties": {
"asset_path": {
"type": "string"
}
},
"required": [
"asset_path"
],
"type": "object"
}
Output schema
{
"properties": {
"returnValue": {
"type": "boolean"
}
},
"required": [
"returnValue"
],
"type": "object"
}
editor_toolset.toolsets.asset.AssetTools.create_folder¶
Creates a folder at the specified path.
Args:
path: The project relative path at which to create the folder.
Returns:
True if the folder could be created or already exists.
Input schema
{
"properties": {
"path": {
"type": "string"
}
},
"required": [
"path"
],
"type": "object"
}
Output schema
{
"properties": {
"returnValue": {
"type": "boolean"
}
},
"required": [
"returnValue"
],
"type": "object"
}
editor_toolset.toolsets.asset.AssetTools.delete¶
Deletes an asset or folder.
Args:
path: The current location of the folder or asset.
Returns:
True if the delete happened successfully. False otherwise.
Input schema
{
"properties": {
"path": {
"type": "string"
}
},
"required": [
"path"
],
"type": "object"
}
Output schema
{
"properties": {
"returnValue": {
"type": "boolean"
}
},
"required": [
"returnValue"
],
"type": "object"
}
editor_toolset.toolsets.asset.AssetTools.duplicate¶
Makes a copy of a folder or asset.
Args:
path: The current location of folder or asset.
new_path: The location of the copy.
Returns:
True if the copy happened successfully. False otherwise.
Input schema
{
"properties": {
"new_path": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": [
"path",
"new_path"
],
"type": "object"
}
Output schema
{
"properties": {
"returnValue": {
"type": "boolean"
}
},
"required": [
"returnValue"
],
"type": "object"
}
editor_toolset.toolsets.asset.AssetTools.exists¶
Determines if a folder or asset exists.
Args:
path: The path at which an asset or folder might exist.
Returns:
True if an asset or folder exists at the path. False otherwise.
Input schema
{
"properties": {
"path": {
"type": "string"
}
},
"required": [
"path"
],
"type": "object"
}
Output schema
{
"properties": {
"returnValue": {
"type": "boolean"
}
},
"required": [
"returnValue"
],
"type": "object"
}
editor_toolset.toolsets.asset.AssetTools.find_assets¶
Searches the project for assets that match specific criteria.
Args:
folder_path: The folder to search within. Pass an empty string to search
the entire project (/Game/ and all plugin content folders including
project plugins and engine plugins).
name: If set, will only return assets whose name contains this string
(case-insensitive).
asset_type: If set, will only return assets that are of this type.
recursive: Whether to search subfolders or not.
tags: If set, will only return assets whose asset registry tags contain
all specified key-value pairs with exact value matches.
Returns:
A list of asset paths that match the criteria.
Input schema
{
"properties": {
"asset_type": {
"default": null,
"description": "Represents a reference to a UObject or UClass.",
"properties": {
"refPath": {
"description": "The reference stored as a soft path string.",
"type": "string"
}
},
"required": [
"refPath"
],
"title": "/Script/CoreUObject.Class",
"type": "object"
},
"folder_path": {
"type": "string"
},
"name": {
"type": "string"
},
"recursive": {
"default": true,
"type": "boolean"
},
"tags": {
"additionalProperties": {
"default": null,
"type": "string"
},
"default": null,
"type": "object"
}
},
"required": [
"folder_path",
"name"
],
"type": "object"
}
Output schema
{
"properties": {
"returnValue": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"returnValue"
],
"type": "object"
}
editor_toolset.toolsets.asset.AssetTools.get_asset_class¶
Gets the class of an asset.
Args:
asset_path: Content path to the asset.
Returns:
The class name of the asset (e.g. 'StaticMesh', 'Material', 'HeroCharacter_C').
Input schema
{
"properties": {
"asset_path": {
"type": "string"
}
},
"required": [
"asset_path"
],
"type": "object"
}
Output schema
{
"properties": {
"returnValue": {
"type": "string"
}
},
"required": [
"returnValue"
],
"type": "object"
}
editor_toolset.toolsets.asset.AssetTools.get_asset_tags¶
Gets the asset registry tags for an asset.
Args:
asset_path: Content path to the asset.
Returns:
A dict mapping tag names to their string values.
Input schema
{
"properties": {
"asset_path": {
"type": "string"
}
},
"required": [
"asset_path"
],
"type": "object"
}
Output schema
{
"properties": {
"returnValue": {
"additionalProperties": {
"type": "string"
},
"type": "object"
}
},
"required": [
"returnValue"
],
"type": "object"
}
editor_toolset.toolsets.asset.AssetTools.get_dependencies¶
Lists assets that the specified asset depends on.
Args:
asset_path: Content path to the asset.
Returns:
A list of content paths for assets that the given asset depends on.
Input schema
{
"properties": {
"asset_path": {
"type": "string"
}
},
"required": [
"asset_path"
],
"type": "object"
}
Output schema
{
"properties": {
"returnValue": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"returnValue"
],
"type": "object"
}
editor_toolset.toolsets.asset.AssetTools.get_metadata_tags¶
Gets the metadata tags for an asset.
Args:
asset_path: Content path to the asset.
Returns:
A dict mapping tag names to their string values.
Input schema
{
"properties": {
"asset_path": {
"type": "string"
}
},
"required": [
"asset_path"
],
"type": "object"
}
Output schema
{
"properties": {
"returnValue": {
"additionalProperties": {
"type": "string"
},
"type": "object"
}
},
"required": [
"returnValue"
],
"type": "object"
}
editor_toolset.toolsets.asset.AssetTools.get_plugin_content_paths¶
Returns the root content paths for plugins that have content.
Args:
include_engine: When True, also includes content plugins under the Engine directory.
Returns:
A list of virtual content root paths (e.g. ['/PluginName/']) for each
in-scope plugin that has a content directory.
Input schema
{
"properties": {
"include_engine": {
"default": false,
"type": "boolean"
}
},
"type": "object"
}
Output schema
{
"properties": {
"returnValue": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"returnValue"
],
"type": "object"
}
editor_toolset.toolsets.asset.AssetTools.get_referencers¶
Lists assets that reference the specified asset.
Args:
asset_path: Content path to the asset.
Returns:
A list of content paths for assets that reference the given asset.
Input schema
{
"properties": {
"asset_path": {
"type": "string"
}
},
"required": [
"asset_path"
],
"type": "object"
}
Output schema
{
"properties": {
"returnValue": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"returnValue"
],
"type": "object"
}
editor_toolset.toolsets.asset.AssetTools.is_checked_out¶
Checks whether an asset is checked out by the current user.
Args:
asset_path: Content path to the asset.
Returns:
True if the asset is currently checked out by the current user.
Input schema
{
"properties": {
"asset_path": {
"type": "string"
}
},
"required": [
"asset_path"
],
"type": "object"
}
Output schema
{
"properties": {
"returnValue": {
"type": "boolean"
}
},
"required": [
"returnValue"
],
"type": "object"
}
editor_toolset.toolsets.asset.AssetTools.is_dirty¶
Checks whether an asset has unsaved changes.
Args:
asset_path: The path to the asset to check.
Returns:
True if the asset has unsaved changes, False if it is saved.
Input schema
{
"properties": {
"asset_path": {
"type": "string"
}
},
"required": [
"asset_path"
],
"type": "object"
}
Output schema
{
"properties": {
"returnValue": {
"type": "boolean"
}
},
"required": [
"returnValue"
],
"type": "object"
}
editor_toolset.toolsets.asset.AssetTools.list_folders¶
Lists the folders contained within a folder.
Args:
root: The project relative path to the folder to search from.
recursive: Subfolders will be searched when this is set to true.
Returns:
A list of paths to folders
Input schema
{
"properties": {
"recursive": {
"default": true,
"type": "boolean"
},
"root_path": {
"type": "string"
}
},
"required": [
"root_path"
],
"type": "object"
}
Output schema
{
"properties": {
"returnValue": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"returnValue"
],
"type": "object"
}
editor_toolset.toolsets.asset.AssetTools.load_asset¶
Loads an asset from the project.
Args:
asset_path: The path to the asset to load.
Returns:
The loaded asset.
Input schema
{
"properties": {
"asset_path": {
"type": "string"
}
},
"required": [
"asset_path"
],
"type": "object"
}
Output schema
{
"properties": {
"returnValue": {
"description": "Represents a reference to a UObject or UClass.",
"properties": {
"refPath": {
"description": "The reference stored as a soft path string.",
"type": "string"
}
},
"required": [
"refPath"
],
"title": "/Script/CoreUObject.Object",
"type": "object"
}
},
"required": [
"returnValue"
],
"type": "object"
}
editor_toolset.toolsets.asset.AssetTools.move¶
Moves or renames an asset or folder.
Args:
path: The current location of the folder or asset.
new_path: The new location and/or name.
Returns:
True if the rename happened successfully. False otherwise.
Input schema
{
"properties": {
"new_path": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": [
"path",
"new_path"
],
"type": "object"
}
Output schema
{
"properties": {
"returnValue": {
"type": "boolean"
}
},
"required": [
"returnValue"
],
"type": "object"
}
editor_toolset.toolsets.asset.AssetTools.read_file¶
Reads a text file from disk and returns its contents.
Only files under /Game/, an enabled plugin's Content/ directory, or
the project Saved/ directory may be read. Only plain text formats are
supported.
Args:
file_path: The path to the file to read.
Returns:
The text content of the file.
Input schema
{
"properties": {
"file_path": {
"type": "string"
}
},
"required": [
"file_path"
],
"type": "object"
}
Output schema
{
"properties": {
"returnValue": {
"type": "string"
}
},
"required": [
"returnValue"
],
"type": "object"
}
editor_toolset.toolsets.asset.AssetTools.save_assets¶
Saves assets to disk.
Args:
asset_paths: The paths to the assets to save. Pass an empty list to save
all dirty assets.
Returns:
True if all assets were saved successfully.
Input schema
{
"properties": {
"asset_paths": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"asset_paths"
],
"type": "object"
}
Output schema
{
"properties": {
"returnValue": {
"type": "boolean"
}
},
"required": [
"returnValue"
],
"type": "object"
}
editor_toolset.toolsets.asset.AssetTools.update_metadata_tags¶
Sets or removes metadata tags on an asset.
Args:
asset_path: Content path to the asset.
set_tags: Tag names mapped to the values to set.
remove_tags: Tag names to remove. Removing a tag that does not
exist is a no-op.
Input schema
{
"properties": {
"asset_path": {
"type": "string"
},
"remove_tags": {
"default": null,
"items": {
"default": null,
"type": "string"
},
"type": "array"
},
"set_tags": {
"additionalProperties": {
"default": null,
"type": "string"
},
"default": null,
"type": "object"
}
},
"required": [
"asset_path"
],
"type": "object"
}
editor_toolset.toolsets.asset.AssetTools.write_file¶
Writes text content to a file on disk.
Only files under /Game/, an enabled plugin's Content/ directory, or
the project Saved/ directory may be written. Only plain text formats
are supported. Overwrites the file if it already exists.
Args:
file_path: The path to the file to write.
content: The text content to write.
Input schema
{
"properties": {
"content": {
"type": "string"
},
"file_path": {
"type": "string"
}
},
"required": [
"file_path",
"content"
],
"type": "object"
}