Thank you for purchasing Unity in Action. Please post any errors, other than those listed below, in the book's
Author Online Forum. We'll compile a comprehensive list and publish it here for everyone's convenience. Thank you!
Last updated August 18, 2017
-
Page 31, in listing 2.1:
For those unfamiliar with C#, the 'f' after the number may be confusing. The text afterward should have this added explanation:
First there's the variable for speed added toward the top of the class definition (the 'f' after the number tells the computer to treat this as a 'float' value; otherwise C# treats decimal numbers as a 'double').
-
Pages 35 and 40:
A sentence on page 35 explains:
If you play the script now, the view will spin around just like before (only a lot faster, because the Y rotation is 9 instead of 3).
That explanation doesn’t mention the Axes menu; this wording explains better:
Set the Axes menu of the MouseLook component to horizontal rotation and play the script; the view will spin as before.
Similarly, on page 40 change:
When you run the new script, to:
When you set the Axes menu and run the new code,…
-
Page 260, in Listing 11.14:
While this code is correct in Unity 5.0, a change in Unity 5.1 breaks this code. Look for the two lines:
trigger.delegates.Clear();
trigger.delegates.Add(entry);
Those lines are correct for Unity 5.0, but Unity 5.1 will throw errors. The lines should be changed to:
trigger.triggers.Clear();
trigger.triggers.Add(entry);
-
Page 272, near the bottom:
The beginning of the paragraph says:
Finally, add buttons to use functions...
For more clarity, add to that description:
Finally, in Level1 add buttons to use functions...