April 2019
Intermediate to advanced
336 pages
8h 22m
English
As we mentioned earlier, a Unity script is a subclass of MonoBehaviour. A MonoBehaviour object can obtain references to objects in the Hierarchy and components that we attach to these objects in the Inspector. A MonoBehaviour object also has its own Inspector, where we can assign additional references, including references to Project assets, such as prefabs. At runtime, Unity sends messages to all MonoBehaviour objects when certain events occur. A subclass of MonoBehaviour may implement callbacks for any of these messages. MonoBehaviour supports more than 60 standard message callbacks. Here are some examples:
Read now
Unlock full access