docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ManageAsset

    Handles asset management operations within the Unity project.

    Inheritance
    object
    ManageAsset
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.AI.MCP.Editor.Tools
    Assembly: Unity.AI.MCP.Editor.dll
    Syntax
    public static class ManageAsset

    Fields

    Description

    Human-readable description of the Unity.ManageAsset tool functionality and usage.

    Declaration
    public const string Description = "Performs asset operations (import, create, modify, delete, etc.) in Unity.\n\nArgs:\n    Action: Operation to perform (e.g., 'Import', 'Create', 'Modify', 'Delete', 'Duplicate', 'Move', 'Rename', 'Search', 'GetInfo', 'CreateFolder', 'GetComponents').\n    Path: Asset path (e.g., \"Assets/Materials/MyMaterial.mat\") or search scope.\n    AssetType: Asset type (e.g., 'Material', 'Folder') - required for 'create'.\n    Properties: Dictionary of properties for 'create'/'modify'.\n        example properties for Material: {\"color\": [1, 0, 0, 1], \"shader\": \"Standard\"}.\n        example properties for Texture: {\"width\": 1024, \"height\": 1024, \"format\": \"RGBA32\"}.\n        example properties for PhysicsMaterial: {\"bounciness\": 1.0, \"staticFriction\": 0.5, \"dynamicFriction\": 0.5}.\n    Destination: Target path for 'duplicate'/'move'.\n    SearchPattern: Search pattern (e.g., '*.prefab').\n    Filter*: Filters for search (Type, Date).\n    Page: Pagination for search.\n\nReturns:\n    A dictionary with operation results ('success', 'data', 'error')."
    Field Value
    Type Description
    string

    Methods

    AssetPathExists(string)

    Checks if an asset exists at the specified path.

    Declaration
    public static bool AssetPathExists(string assetPath)
    Parameters
    Type Name Description
    string assetPath

    The asset path to check.

    Returns
    Type Description
    bool

    True if the asset exists; otherwise, false.

    HandleCommand(ManageAssetParams)

    Demonstrates typed parameter handling with automatic schema generation. The schema is auto-generated from the ManageAssetParams record type.

    Declaration
    [McpTool("Unity.ManageAsset", "Performs asset operations (import, create, modify, delete, etc.) in Unity.\n\nArgs:\n    Action: Operation to perform (e.g., 'Import', 'Create', 'Modify', 'Delete', 'Duplicate', 'Move', 'Rename', 'Search', 'GetInfo', 'CreateFolder', 'GetComponents').\n    Path: Asset path (e.g., \"Assets/Materials/MyMaterial.mat\") or search scope.\n    AssetType: Asset type (e.g., 'Material', 'Folder') - required for 'create'.\n    Properties: Dictionary of properties for 'create'/'modify'.\n        example properties for Material: {\"color\": [1, 0, 0, 1], \"shader\": \"Standard\"}.\n        example properties for Texture: {\"width\": 1024, \"height\": 1024, \"format\": \"RGBA32\"}.\n        example properties for PhysicsMaterial: {\"bounciness\": 1.0, \"staticFriction\": 0.5, \"dynamicFriction\": 0.5}.\n    Destination: Target path for 'duplicate'/'move'.\n    SearchPattern: Search pattern (e.g., '*.prefab').\n    Filter*: Filters for search (Type, Date).\n    Page: Pagination for search.\n\nReturns:\n    A dictionary with operation results ('success', 'data', 'error').", null, null, Groups = new string[] { "core", "assets" })]
    public static object HandleCommand(ManageAssetParams @params)
    Parameters
    Type Name Description
    ManageAssetParams params

    Parameters containing the action to perform and relevant asset information.

    Returns
    Type Description
    object

    A response object indicating success or failure with relevant asset data.

    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)