Undocumented Unity Function

So, you’ll find the childCount property documented, but what you won’t find in the documentation is GetChild(). According to the forums, the reason it’s been left out is because of unpredictability – the array of children is not guaranteed to be in a consistent order. However, that’s not to say that it can’t still be useful – you can get the idea of where I’m going with one concept from the snippet... Read More

Fun with Exposed Variables in Unity

At first I wasn’t thrilled about public variables being exposed in Unity’s editor – it seemed to be a bit dangerous, burying variable within GUI elements. Reminded me too much of hunting through Flash MovieClips for code snippets. And if you’re not careful, you will get burned. For example, public int exposedInt = 100; at the top of your class rather than assigning the variable within the constructor can cause considerable... Read More