Changing tonnes of textures []

I am making a football game, where u can select your favourite team. What I gotta do is change the player’s images based on the team selected. For example, I chose “Argentina”, then the players’s images will be Argentina jersey images.

I animate the players by frames, Texture2D frames and I have 48 frames for 1 jersey colour. I have 32 teams to choose from.

How do I change the textures efficiently without affecting (much) the game’s performance?

Is there a way to change the arrays of material based on the name of the image?

In a shader. Check the Main Color Parameter of a Diffuse Shader and see if that does what you want.

You can of course also write your own shader to do exatly what you want if you only want to replace certain colors. Like you could have three Colors and in your texture everything you want to be color1, you paint in bright red, everything you want in color two in green and blue for color3.
Then your custom shader can replace red with the color1 parameter etc.