I have a 2d character that has separate sprite sheets for each of their animations - idle, walk, run cycles etc. Those sprite sheets each have associated normal maps as well, so in the animation clip that defines the individual sprites to animate, I’d also like to specify the corresponding texture to load into the normal map slot of my custom material.
The problem is that, while every other property of my material appears to be exposed in the animation window, the normal map texture simply is not, and I can’t work out whether there’s a reason for this limitation or (even better) a workaround?
My current fix is (as can be seen in the screenshot) to create entirely separate materials for each cycle with the correct normal map statically assigned to each, and change the material via the Sprite Renderer.Material Ref property. However, this seems very unwieldy to create separate materials for each animation, and I’d much rather simply animate the texture property of a single material. Has anyone else experienced this issue or got any advice? Thanks.
Based on @RomanLed’s comments above and my own experience, it seems it’s not possible to animate textures of a material directly via an animation clip. The solution I’ve ended up going for is to create a new StateMachineBehaviour which overrides OnStateEnter attached to each state in my Animator, which assigns the correct _NormalMap texture corresponding to the atlas of sprites used in that state.
public class SetNormalMap : StateMachineBehaviour
{
public Material material;
public Texture2D normalMap;
// This will be called when the animator first transitions to this state.
override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
{
material.SetTexture("_NormalMap", normalMap);
}
}

In hindsight, this might actually be a more elegant solution than my original plan anyway, since it only assigns the texture once when each state is first entered, rather than reassigning the same texture each time an animation clip looped which would be the case either with an animation event or a animated material property.
Thanks for the solution!
It wasn’t working for me as-is. So I modified it for anyone else that’s having trouble:
public class SetNormalMap : StateMachineBehaviour
{
private Renderer _renderer;
public Material material;
public Texture2D normalMap;
// This will be called when the animator first transitions to this state.
private void Awake()
{
_renderer = FindObjectOfType<PlayerController>().GetComponent<Renderer>();
_renderer.material.EnableKeyword ("_NormalMap");
}
override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
{
_renderer.material.SetTexture("_NormalMap", normalMap);
}
}
If you get any glitches with the normal maps at the start/end of animations, check the blending on your animation states.