Game Development Reference
In-Depth Information
e(0,0); //This calls the event
}
}
//---------------------------------------------------
/// <summary>
/// This is a sample delegate event. Can be referenced by Delegate
Type EventHandler
/// </summary>
/// <param name="Param1">Example param</param>
/// <param name="Param2">Example param</param>
void HandleMyEvent (int Param1, int Param2)
{
Debug.Log ("Event Called");
}
//---------------------------------------------------
Editor debugging
It's sometimes claimed that Unity has no debugging tools built into the editor, but
this is not quite true. With Unity, you can play your game and edit the scene at the
same time while the game is running. You can even observe and edit properties in
the Object Inspector, both private and public, as we saw earlier. This can give you
a complete and graphical picture of your game at runtime; and allow you to detect
and observe a wide range of potential errors. This form of debugging should not
be underestimated. To get the most from in-editor debugging, activate the
Debug
mode from the Object Inspector by clicking on the context menu icon in the top-right
corner of the inspector and then choose
Debug
from the menu, as shown here:
Accessing the Debug mode from the Object Inspector