Using the Animator to change Renderer textures?

Hello, I’m wondering if there’s a way to expose a material’s texture map properties to the animator. Currently you can only change value properties and colors, but none of the maps.

I want to be able to swap out albedo texture and emissive texture on the timeline, but I can’t figure out how to do that. I’m trying to do what SpriteRenderer does with Sprite property essentially.

I know it’s possible because I can swap the textures in my own animation code, I just would much rather use Unity’s visual animation timeline to do the changes.

Thanks!

When you add properties to the animation clip in the animation window, there is an option to add the mesh renderer property.
I would try to tinker with Mesh Renderer.Material._Main Tex_ST and Mesh Renderer.Material._Emission Map_ST.

Thanks for the response. I tried those, but they only expose a Vector4 to animate values, not an actual texture. Do you know what ST stands for?

It would appear ST are just two consecutive letter variables like UV. It is not the texture, but the offset and tiling.

It also seems that the only way to animate supplementary maps is to do it manually or use a Spritesheet for all textures. As long as the layouts of all the spritesheets are the same it will work. The SpriteRenderer will use the same region of all maps in the material when assigned a sprite. The only problem then is having one material per spritesheet, which could be swapped out with a script.