docs.unity3d.com
    目次を表示する/隠す

    Class SpriteLibraryAsset

    A custom Asset that stores Sprites grouping.

    Inheritance
    Object
    Object
    ScriptableObject
    SpriteLibraryAsset
    Inherited Members
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(String)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(Object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, Boolean)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, Boolean)
    Object.Destroy(Object, Single)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, Boolean)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, Boolean)
    UnityEngine.Object.FindObjectsByType(System.Type, UnityEngine.FindObjectsSortMode)
    UnityEngine.Object.FindObjectsByType(System.Type, UnityEngine.FindObjectsInactive, UnityEngine.FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, Single)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsSortMode)
    UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
    UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsInactive, UnityEngine.FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
    UnityEngine.Object.FindFirstObjectByType<T>()
    UnityEngine.Object.FindAnyObjectByType<T>()
    UnityEngine.Object.FindFirstObjectByType<T>(UnityEngine.FindObjectsInactive)
    UnityEngine.Object.FindAnyObjectByType<T>(UnityEngine.FindObjectsInactive)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    UnityEngine.Object.FindFirstObjectByType(System.Type)
    UnityEngine.Object.FindAnyObjectByType(System.Type)
    Object.FindObjectOfType(Type, Boolean)
    UnityEngine.Object.FindFirstObjectByType(System.Type, UnityEngine.FindObjectsInactive)
    UnityEngine.Object.FindAnyObjectByType(System.Type, UnityEngine.FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEngine.U2D.Animation
    Syntax
    [HelpURL("https://docs.unity3d.com/Packages/com.unity.2d.animation@latest/index.html?subfolder=/manual/SLAsset.html")]
    [MovedFrom("UnityEngine.Experimental.U2D.Animation")]
    [Icon("Packages/com.unity.2d.animation/Editor/Assets/ComponentIcons/Animation.SpriteLibrary.png")]
    public class SpriteLibraryAsset : ScriptableObject

    Methods

    AddCategoryLabel(Sprite, String, String)

    Add or replace and existing Sprite into the given Category and Label.

    Declaration
    public void AddCategoryLabel(Sprite sprite, string category, string label)
    Parameters
    Type Name Description
    Sprite sprite

    Sprite to add.

    String category

    Category to add the Sprite to.

    String label

    Label of the Category to add the Sprite to. If this parameter is null or an empty string, it will attempt to add a empty category.

    GetCategorylabelNames(String)

    (Obsolete) Returns the labels' name for the given name.

    Declaration
    [Obsolete("GetCategorylabelNames has been deprecated. Please use GetCategoryLabelNames (UnityUpgradable) -> GetCategoryLabelNames(*)")]
    public IEnumerable<string> GetCategorylabelNames(string category)
    Parameters
    Type Name Description
    String category

    Category name.

    Returns
    Type Description
    IEnumerable<String>

    A Enumerable string representing labels' name.

    GetCategoryLabelNames(String)

    Returns the labels' name for the given name.

    Declaration
    public IEnumerable<string> GetCategoryLabelNames(string category)
    Parameters
    Type Name Description
    String category

    Category name.

    Returns
    Type Description
    IEnumerable<String>

    A Enumerable string representing labels' name.

    GetCategoryNames()

    Return all the Category names of the Sprite Library Asset that is associated.

    Declaration
    public IEnumerable<string> GetCategoryNames()
    Returns
    Type Description
    IEnumerable<String>

    A Enumerable string value representing the name.

    GetSprite(String, String)

    Returns the Sprite registered in the Asset given the Category and Label value.

    Declaration
    public Sprite GetSprite(string category, string label)
    Parameters
    Type Name Description
    String category

    Category string value.

    String label

    Label string value.

    Returns
    Type Description
    Sprite

    RemoveCategoryLabel(String, String, Boolean)

    Remove a Label from a given Category.

    Declaration
    public void RemoveCategoryLabel(string category, string label, bool deleteCategory)
    Parameters
    Type Name Description
    String category

    Category to remove from.

    String label

    Label to remove.

    Boolean deleteCategory

    Indicate to remove the Category if it is empty.

    トップに戻る
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)