- Home /
Question by
hotozi · May 17, 2013 at 05:06 AM ·
gameobjectarraymaterial
Cant change GO material with multipli material
when i do that it work only with the first material
ITEM1.gameObject.renderer.materials=PE.gameObject.renderer.materials;
but when i do that it doesnt work
ITEM1.gameObject.renderer.materials[1]=PE.gameObject.renderer.materials[0];
how can i change my ITEM1 second material with my PE first material?
Comment
Best Answer
Answer by vontio · May 17, 2013 at 10:05 AM
var mats = PE.gameObject.renderer.materials;
mats[0] = ITEM1.gameObject.renderer.materials[1];
ITEM1.gameObject.renderer.materials = mats;
Renderer.materials If you want to change some materials in it, get the value, change an entry and set materials back
it work but not realy....cuz the ITE$$anonymous$$ material(1) get equal to PE material (1) and not the material (0)
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Material doesn't have a color property '_Color' 4 Answers
Array problem? help please! 1 Answer
Array weapons Wheel scroll switch 1 Answer