Skip to main content

One post tagged with "unity tips"

View All Tags

Architecting Unity3D - Accessing Components on MonoBehaviour

· 5 min read

So what is in a “.” when accessing a Component​

Check the Post on the Unity forums discussing this practice here – http://forum.unity3d.com/threads/245400-Unity-5-Beta-Insights

Update, Unity have now written a post on the changes posed for Unity 5 and the inner workings, well worth a read – http://bit.ly/1pf5Wog

Another interesting post has arisen which also includes some timing and stats for using cached components verses using the shortcuts, check it out – http://bit.ly/1pfaUkQ

When you use components and scripts in your Unity3D project and then want to access them in code, it is very easy to just start writing: