Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

GameObject.transform.position gonna cause low effeciency ?

$
0
0
Today, I heard an interesting advice from my friend. He said that :

u don't call GameObject.transform.position in Monobehavior.Update() ,
because GameObject.transform equals Transform trans = GameObject.GetComponent<Transform>() ;

so that would cause low effeciency ... then he show me lots of example in NGUI code ...
And he told me to cache a GameObject.transform reference at the very beginning..
I really doubt that, can any one explain that ?

thanks a lot.

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



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