I've seen the method of replacing materials through scripts in example scenes, but they don't allow me to set materials more efficiently. For example, when replacing materials via scripts, I can't preview the effect directly in edit mode because the character still uses the original material. The script only takes effect and replaces the material in Play mode. Now I want to do it like regular objects - create a material and manually drag it to the material slot to complete the replacement, preview the effect in edit mode, and retain the material settings in Play mode. But I don't know how to implement this on a Spine skeleton.

    Related Discussions
    ...

    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:

    1. 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.

    2. 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.

    3. 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.

      Spinebot Is there any way to make Spine characters automatically create unique material instances based on the initial material and then replace the initial material? For example, spineboy1 and spineboy2 would automatically generate two material instances (instance1 and instance2) during play mode and assign them to the two boys. These instances could display different effects (such as shader effects that vary according to coordinates), but all of this would happen automatically without requiring me to manually replace each one.

        suanLoBeach I've seen the method of replacing materials through scripts in example scenes, but they don't allow me to set materials more efficiently. For example, when replacing materials via scripts, I can't preview the effect directly in edit mode because the character still uses the original material.

        Spineboy's anwer is correct.
        Reading the respective documentation section, which I've suggested to you in the past, would have helped as well:
        https://esotericsoftware.com/spine-unity-rendering#Materials

        suanLoBeach Is there any way to make Spine characters automatically create unique material instances based on the initial material and then replace the initial material? For example, spineboy1 and spineboy2 would automatically generate two material instances (instance1 and instance2) during play mode and assign them to the two boys. These instances could display different effects (such as shader effects that vary according to coordinates), but all of this would happen automatically without requiring me to manually replace each one.

        You can write a script that does that. Again, see the documentation here:
        https://esotericsoftware.com/spine-unity-rendering#CustomMaterialOverride-and-CustomSlotMaterials