Class AssetEditorUtility | Anime Toolbox | 0.4.0-preview
docs.unity3d.com
    Show / Hide Table of Contents

    Class AssetEditorUtility

    A utility class for executing operations related to Unity assets in the editor.

    Inheritance
    Object
    AssetEditorUtility
    Namespace: Unity.AnimeToolbox.Editor
    Syntax
    public static class AssetEditorUtility

    Methods

    DeleteAssetsOrFiles(String, String)

    Delete assets/files in a given path with specified file patterns. This can delete files both inside and outside Unity project folder.

    Declaration
    public static void DeleteAssetsOrFiles(string path, string searchPattern)
    Parameters
    Type Name Description
    String path

    The path which contain the assets to be deleted.

    String searchPattern

    The pattern of the files. Ex: "*.prefab"

    OverwriteAsset(Object, String)

    Creates an asset in a given path from an Object. This will overwrite the existing asset if it exists.

    Declaration
    public static void OverwriteAsset(Object asset, string path)
    Parameters
    Type Name Description
    Object asset

    The object to be created as an asset.

    String path

    The path of the asset, relative to the Unity project folder.

    PingAssetByPath(String)

    Pings (highlights) an asset by its path in the Project window. The path can be absolute, or relative to the Unity project folder.

    Declaration
    public static bool PingAssetByPath(string path)
    Parameters
    Type Name Description
    String path

    The asset path.

    Returns
    Type Description
    Boolean

    True if the asset is found. False otherwise.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023