Class SpriteResolver
Updates a SpriteRenderer's Sprite reference on the Category and Label value it is set
Inherited Members
UnityEngine.Component.GetComponentInParent<T>(System.Boolean)
UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsSortMode)
UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsInactive, UnityEngine.FindObjectsSortMode)
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)
Namespace: UnityEngine.Experimental.U2D.Animation
Syntax
[ExecuteInEditMode]
[DisallowMultipleComponent]
[AddComponentMenu("2D Animation/Sprite Resolver (Experimental)")]
[DefaultExecutionOrder(-2)]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.2d.animation@latest/index.html?subfolder=/manual/SLAsset.html%23sprite-resolver-component")]
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 |