1.5 KiB
Changing Parts of a Character
You can use Sprite Swap to quickly change only one Sprite on the character Prefab without affecting the other Sprites. This means you can alter part of a character’s appearance (for example, change a scarf to a different color) while the rest of the character remains the same.
In the following example, we have two Sprites that are variations of the character’s scarf - one green and one blue. This workflow demonstrates how to switch from one to the other in the same Prefab.
Left: The original green scarf. Right: An alternate blue scarf.
-
Place the Sprites for both scarves into the same Sprite Library Asset, and add them both to the same Category named ‘Scarf’. You can do this directly in the Skinning Editor via the Sprite tab in the Sprite Visibility panel.
-
Give each of the Sprites a unique Label.
-
In the Scene, select the character Prefab and then select the ‘Scarf’ GameObject the Hierarchy window.
-
Go to the Sprite Resolver component of the ‘Scarf’ GameObject. The Sprite Resolver‘s visual selector displays the two Sprites available in the ‘Scarf’ Category.
-
Select the ‘blue scarf’ to switch the Sprite rendered by the ‘Scarf’ GameObject to it instead.