Quantcast
Channel: UGUI & TextMesh Pro
Viewing all articles
Browse latest Browse all 23263

GetComponent of disabled object

$
0
0
I know that GetComponent (including GetComponentInChildren, GetComponentInParent in 4.6) only return active objects. Is there a way to get one inactive component without using GetComponents(true)[0] to avoid allocating memory of the returned component array?

Edit: I mean only GetComponentInChildren and GetComponentInParent - GetComponent finds components even if the gameobject is inactive.

Viewing all articles
Browse latest Browse all 23263

Trending Articles



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