- Home /
Renderer material simple question
I have a simple question ... with this line: renderer.material.color = Color.Red change de color of material ... but how i can back to the original material color later?
(i apply this on a object texture)
thx!
Answer by DaveA · May 02, 2011 at 06:07 PM
Save it somewhere
var originalColor : Color = renderer.material.color;
renderer.material.color = Color.Red
// Waits 5 seconds yield WaitForSeconds (5);
renderer.material.color = originalColor;
Its work but i wanna back to the original color skin (my character skin)... with line: var originalColor : Color = renderer.material.color; i have to pick up a color ... understand me?
No sorry I don't. Are there more than one materials on your object?
yap, but have 1 material in the body ... i wanna make red when a bullet impact with the enemy and in few seconds turn to the orignal color (skin) .. srry for my bad english ;)
mm with the var originalColor i pick a base color, but i wanna just go back to the orignal texture color ... my enemy have 1 texture (t-shir and pants, with diferents color) u try make when the bullet impact, all texture change to red, and in few seconds go back to original texture color, Sorry if I cant express myself well, my english sucks