To set up materials for Spine skeletons in Unity in a way that allows you to preview them in edit mode, you can use the SkeletonRendererCustomMaterials
component. This component allows you to assign materials to specific slots directly in the Unity Editor, similar to how you would with regular Unity objects. Here's how you can do it:
Add the SkeletonRendererCustomMaterials
Component: Select your Spine GameObject in the Unity Editor. In the Inspector, click on "Add Component" and search for SkeletonRendererCustomMaterials
. Add this component to your GameObject.
Assign Materials to Slots: In the SkeletonRendererCustomMaterials
component, you will see options to assign materials to specific slots. You can manually drag and drop your custom materials into these slots. This setup allows you to see the changes directly in the editor without needing to enter Play mode.
Retain Material Settings in Play Mode: The materials you assign using the SkeletonRendererCustomMaterials
component will be retained when you enter Play mode, allowing you to see the same visual effects as in edit mode.
By using the SkeletonRendererCustomMaterials
component, you can manage your materials more conveniently and preview them in edit mode, just like with regular Unity objects.