- Home /
Sprite Manager 2 - Change Texture of a gameObject
Hi,
is it possible to change the texture of a gameobject in runtime?
For example in a level selection screen, that a locked level changes its appearence, when it gets unlocked.
Thanks
Comment
Answer by efge · Mar 18, 2011 at 02:55 PM
You could change the main material's texture:
var texture : Texture;
renderer.material.mainTexture = texture;
Your answer
Follow this Question
Related Questions
Animation and Sprite-Swapping 1 Answer
Unity altering my sprites on import? 1 Answer
Cycle through object materials on mouse click in C# 1 Answer
Button Sprite Swap ? 1 Answer
Swap object sprites on collision, how? 2 Answers