September 2013
Beginner
292 pages
6h 19m
English
Every time you create a script in Unity, these two skeleton methods are included. That's because they are rather important. These are the most commonly used MonoBehaviour methods, see the next screenshot for others. I like to call these Unity's magic methods because you don't call these methods, Unity does. It's usually important that at least one MonoBehaviour method is included in a Unity script to cause the script to execute. I say usually because other methods in the script may be called from another script or class.
How do I know these two methods are called by Unity and that they are MonoBehaviour methods? Here, the Unity Scripting Reference is your friend.
Here's just a portion of the methods Unity can ...