Game Development Reference
In-Depth Information
Figure 3-4. Editing code inside MonoDevelop. You can use other code editors, too, if you prefer; however, this topic will use
MonoDevelop
If any compile-time errors are encountered, these are listed in the Editor Console window, which can
be shown by selecting Window Console from the application main menu, as shown in Figure 3-5 .
Figure 3-5. Compile-time errors are printed inside the Console window
By default, all newly created C# classes in Unity are descended from class MonoBehaviour ,
which is part of the Unity API. See Listing 3-5 to see the autogenerated code. In essence,
MonoBehaviour represents the base class from which all components are ultimately derived. For the
NotificationsManager, and indeed for many classes, MonoBehaviour is an entirely suitable default
class from which to derive, and so can be left as-is. In some cases, however, as we'll see later, we'll
need to change the super-class to a different type.
 
Search WWH ::




Custom Search