docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class AssetDatabaseHelper

    Set of helpers for AssetDatabase operations.

    Inheritance
    object
    AssetDatabaseHelper
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEditor.Rendering
    Assembly: Unity.RenderPipelines.Core.Editor.dll
    Syntax
    public static class AssetDatabaseHelper

    Methods

    FindAssetPaths<T>(string)

    Finds all assets paths of type T in the project.

    Declaration
    public static IEnumerable<string> FindAssetPaths<T>(string extension = null) where T : Object
    Parameters
    Type Name Description
    string extension

    Asset type extension i.e ".mat" for materials. Specifying extension make this faster.

    Returns
    Type Description
    IEnumerable<string>

    An IEnumerable off all assets paths found.

    Type Parameters
    Name Description
    T

    The type of asset you are looking for

    FindAssets<T>(string)

    Finds all assets of type T in the project.

    Declaration
    public static IEnumerable<T> FindAssets<T>(string extension = null) where T : Object
    Parameters
    Type Name Description
    string extension

    Asset type extension i.e ".mat" for materials. Specifying extension make this faster.

    Returns
    Type Description
    IEnumerable<T>

    An IEnumerable off all assets found.

    Type Parameters
    Name Description
    T

    The type of asset you are looking for

    In This Article
    Back to top
    Copyright © 2024 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)