I've been having a hell of a time trying to make a workaround for swapping textures at run time. The game I am currently working on has different "units" which are each different spine characters.
I need to be able to swap textures because each unit will be assigned to a different team colour. I would much rather try to avoid having to export each unit's spine project 4 times, each time swapping each sprite with a different team colour and instead assign the skeleton a different material or texture.
I've read that the mesh renderer material is overwritten by the SkeletonRenderer in the LateUpdate but I couldn't for the life of me find a solution to my problem.
What does seem to work is to change the material in the MonoBehaviour Update but doing that every frame would be expensive, especially for multiple units with multiple teams.
I'm looking into messing with the SkeletonData class but it might get messy.
Any help is appreciated.
Thanks!