Quantcast
Channel: Answers for "Set the material the same as another GameObject"
Browsing all 4 articles
Browse latest View live

Answer by robertbu

If you format your code fragments as code (i.e. use the 101/010 button, the will not disappear. It is unclear if the material you want is the one on the parent object. If so, you don't really need to...

View Article



Answer by kikoncuo

renderer.material = transform.parent.renderer.material; This line of code provided by [robertbu][1] as a commentary does exactly what I wanted without dealing with getcomponentinparent stuff. [1]:...

View Article

Answer by robertbu

If you format your code fragments as code (i.e. use the 101/010 button, the will not disappear. It is unclear if the material you want is the one on the parent object. If so, you don't really need to...

View Article

Answer by kikoncuo

renderer.material = transform.parent.renderer.material; This line of code provided by [robertbu][1] as a commentary does exactly what I wanted without dealing with getcomponentinparent stuff. [1]:...

View Article
Browsing all 4 articles
Browse latest View live


Latest Images