I want to do this through code, not through an inspector. Can anyone help with this?
I am using this code to change material. Get originalMaterial = skeletonAnimation.GetComponent<MeshRenderer>().material not working.
skeletonAnimation.CustomMaterialOverride.Add(originalMaterial, newMaterial);