I have a 5 sided cube (you don't see one side), each face has a different texture. This is the code I use to set each texture:
How to Avoid Leaking Textures
Code (CSharp):
- //Top
- GetComponent<MeshRenderer>().materials[0].mainTextureScale = new Vector2(transform.localScale.x / 2f, transform.localScale.y / 2f);
- //South