Class SpriteResolver
Updates a SpriteRenderer's Sprite reference on the Category and Label value it is set.
Inherited Members
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
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(-2)]
[HelpURL("https://docs.unity.cn/Packages/com.unity.2d.animation@9.0/manual/SL-Resolver.html")]
[MovedFrom("UnityEngine.Experimental.U2D.Animation")]
public class SpriteResolver : MonoBehaviour, ISerializationCallbackReceiver, 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. |