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

Answer by kikoncuo

$
0
0
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]: http://answers.unity3d.com/users/16320/robertbu.html

Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>