Greetings,
Can someone advise me on how I can change materials at runtime?
I've added the define I found on github:
#define SPINE_OPTIONAL_MATERIALOVERRIDE
Code that runs at runtime
var meshRenderer = skeletonAnimation.GetComponent<MeshRenderer>();
originalMaterialInstance = meshRenderer.material;
slowDownMaterialInstance.SetTexture( "_MainTex", originalMaterialInstance.GetTexture( "_MainTex" ) );
skeletonAnimation.CustomMaterialOverride.Add( originalMaterialInstance, slowDownMaterialInstance );
Nothing seems to change and I am a bit stumped