|
I wondered if there was a simple way to change the texture on an already textured object using a trigger? With something similar to this which has worked with playing animation with an invisible trigger, but how do I code to change the texture once the trigger has been activated?
The Get material is only a guess, but does anyone have an answer?
(comments are locked)
|
|
Crate an folder named "Resources" in your assets.(If you don't have one) Put your texture in that folder. (For example "TextureName.png") And call this on the trigger: Thanks very much! Just what I wanted, would it be much more complicated to choose which texture it replaces. For example one of my objects will have the main texture and will have a black / white image texture so it looks like text is carved into the object (similar to a gravestone). Is there an easy way to change the black / white image rather than the main overall texture. But if not this has been very much appreciated!
Nov 30 '10 at 10:31 AM
Rukey4
Google for "Unity SetTexture". Oh, and please accept my answer =D
Nov 30 '10 at 02:57 PM
IJM
(comments are locked)
|
