Class SpriteResolver | 2D Animation | 3.0.8
docs.unity3d.com
    Show / Hide Table of Contents

    Class SpriteResolver

    Updates a SpriteRenderer's Sprite reference on the Category and Label value it is set

    Inheritance
    Object
    SpriteResolver
    Namespace: UnityEngine.Experimental.U2D.Animation
    Syntax
    public class SpriteResolver : MonoBehaviour

    Properties

    spriteLibrary

    Property to get the SpriteLibrary the SpriteResolver is resolving from

    Declaration
    public SpriteLibrary spriteLibrary { get; }
    Property Value
    Type Description
    SpriteLibrary

    Methods

    GetCategory()

    Get the Category set for the SpriteResolver

    Declaration
    public string GetCategory()
    Returns
    Type Description
    String

    The Category's name

    GetLabel()

    Get the Label set for the SpriteResolver

    Declaration
    public string GetLabel()
    Returns
    Type Description
    String

    The Label's name

    ResolveSpriteToSpriteRenderer()

    Set the Sprite in SpriteResolver to the SpriteRenderer component that is in the same GameObject.

    Declaration
    public void ResolveSpriteToSpriteRenderer()

    SetCategoryAndLabel(String, String)

    Set the Category and label to use

    Declaration
    public void SetCategoryAndLabel(string category, string label)
    Parameters
    Type Name Description
    String category

    Category to use

    String label

    Label to use

    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