Class SpriteLibrary
Component that holds a Sprite Library Asset. The component is used by SpriteResolver Component to query for Sprite based on Category and Index
Inherited Members
Namespace: UnityEngine .U2D.Animation
Assembly: solution.dll
Syntax
[DisallowMultipleComponent]
[AddComponentMenu("2D Animation/Sprite Library")]
[MovedFrom("UnityEngine.Experimental.U2D.Animation")]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.2d.animation@7.0/manual/SLAsset.html#sprite-library-component")]
public class SpriteLibrary : MonoBehaviour
Properties
Name | Description |
---|---|
sprite |
Get or Set the current SpriteLibraryAsset to use |
Methods
Name | Description |
---|---|
Add |
Add or replace an override when querying for the given Category and Label. |
Add |
Add or replace an override when querying for the given Category. All the categories in the Category will be added. |
Add |
Add or replace an override when querying for the given Category and Label from a SpriteLibraryAsset |
Get |
Return the Sprite that is registered for the given Category and Label for the SpriteLibrary |
Has |
Method to check if a Category and Label pair has an override |
Refresh |
Request SpriteResolver components that are in the same hierarchy to refresh |
Remove |
Remove all Sprite Library override for a given category |
Remove |
Remove Sprite Library override for a given category and label |