Quantcast
Channel: Answers for "How to GetComponent once for multiple comparisions"
Viewing all articles
Browse latest Browse all 4

Answer by nsxdavid

$
0
0
Easy, you cache it yourself: Create a variable on your class to hold a reference to the component and do the GetComponent<> once in your start method and use that variable everywhere else in your class.

Viewing all articles
Browse latest Browse all 4

Trending Articles