Class SpriteResolver
Updates a SpriteRenderer's Sprite reference on the Category and Label value it is set.
Implements
IPreviewable
Inherited Members
Component.GetComponent<T>()
Component.TryGetComponent<T>(out T)
Component.GetComponentInChildren<T>()
Component.GetComponentsInChildren<T>()
Component.GetComponentInParent<T>()
Component.GetComponentsInParent<T>()
Component.GetComponents<T>()
Object.GetHashCode()
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.DestroyObject(Object)
Object.FindObjectsOfType<T>()
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindObjectOfType<T>()
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: UnityEngine.U2D.Animation
Assembly: solution.dll
Syntax
[ExecuteInEditMode]
[DisallowMultipleComponent]
[AddComponentMenu("2D Animation/Sprite Resolver")]
[Icon("Packages/com.unity.2d.animation/Editor/Assets/ComponentIcons/Animation.SpriteResolver.png")]
[DefaultExecutionOrder(-20)]
[HelpURL("https://docs.unity.cn/Packages/com.unity.2d.animation@latest/index.html?subfolder=/manual/SL-Resolver.html")]
[MovedFrom("UnityEngine.Experimental.U2D.Animation")]
public class SpriteResolver : MonoBehaviour, IPreviewable
Properties
| Name | Description |
|---|---|
| spriteLibrary | Property to get the SpriteLibrary the SpriteResolver is resolving from. |
Methods
| Name | Description |
|---|---|
| GetCategory() | Get the Category set for the SpriteResolver. |
| GetLabel() | Get the Label set for the SpriteResolver. |
| OnPreviewUpdate() | Empty method. Implemented for the IPreviewable interface. |
| ResolveSpriteToSpriteRenderer() | Set the Sprite in SpriteResolver to the SpriteRenderer component that is in the same GameObject. |
| SetCategoryAndLabel(string, string) | Set the Category and label to use. |