Nessuna descrizione
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SL-component.md 1.7KB

Sprite Library component in Unity

The Sprite Library component defines which Sprite Library Asset a GameObject refers to at runtime. When you attach this component to a GameObject, the Sprite Resolver component attached to the same GameObject or child GameObject will refer to the Sprite Library Asset set by the Sprite Library component. This allows you to change the Sprite referenced by a Sprite Renderer with the Sprite Resolver component.

Sprite Library Inspector window

In the Sprite Library component’s Inspector window, assign the desired Sprite Library Asset to the Sprite Library Asset property. You can also select New to create and save a new Sprite Library Asset which is automatically assigned to the Sprite Library Asset field.

After assigning a Sprite Library Asset, the Inspector window shows a Open Sprite Library Editor button.

To edit the contents of a Sprite Library Asset, use the Sprite Library Editor window.

Overriding entries

You can’t override Sprite Library entries directly in the Inspector window starting from version 9 of the 2D Animation package. To override Sprite Library entries, use these public methods instead.

To save the overrides to a separate asset, select Export to Sprite Library Asset. The asset is then automatically assigned to the Sprite Library Asset property.

Additional resources