docs.unity3d.com
    Show / Hide Table of Contents

    Class ScriptableObjectUtils

    Inheritance
    Object
    ScriptableObjectUtils
    Namespace: Unity.InteractiveTutorials
    Syntax
    public class ScriptableObjectUtils

    Methods

    CreateAsset<T>(String, String)

    This makes it easy to create, name and place unique new ScriptableObject asset files.

    Declaration
    public static T CreateAsset<T>(string fileName, string path = "")
        where T : ScriptableObject
    Parameters
    Type Name Description
    String fileName
    String path
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    GetOrSaveUniqueAsset<T>(T, String)

    Saves an asset if it doesn't exists already

    Declaration
    public static (T, string) GetOrSaveUniqueAsset<T>(T asset, string fileName)
        where T : ScriptableObject
    Parameters
    Type Name Description
    T asset
    String fileName
    Returns
    Type Description
    ValueTuple<T, String>

    The newly created asset or its existing instance (and its path)

    Type Parameters
    Name Description
    T

    SaveAsset<T>(T, String, String)

    Declaration
    public static string SaveAsset<T>(T asset, string fileName, string path)
        where T : ScriptableObject
    Parameters
    Type Name Description
    T asset
    String fileName
    String path
    Returns
    Type Description
    String
    Type Parameters
    Name Description
    T
    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