Game Development Reference
In-Depth Information
Tip You can easily tear off the Console tab to float the Console window. If you are working in the 2x3 layout,
it will automatically be floated when you double-click the message on the status line. You can also open the
console through the Window menu.
3.
Double-click on the error message in the console.
4.
Switch focus to the script editor.
The line in question is highlighted in the script editor (Figure 5-8 ).
Figure 5-8. The line in question, highlighted in the code window
Let's append the number with f as suggested in the console.
5.
Change the line as follows:
public float earLength = 2.5f;
6.
Save the script.
The error message in the console goes away. Floats require a lower case f after the number.
7.
Click Play.
This time, Play mode turns on.
8.
Turn off Play mode.
9.
Delete the semi-colon at the end of the line.
Before you even save the script, the script editor draws a squiggly line under the line that will
generate an error (Figure 5-9 ).
Search WWH ::




Custom Search