Holistic Mobile Game Development with Unity Errata

Chapter 4

Section 4.20.1 

Unity Hands-On Blob Shadows, Step 2.

After inserting the plane remove the Mesh Collider component.

Note: The mesh collider is not required and will cause the error below to occur in the Hands On exercises later in the chapter.

“Actor::updateMassFromShapes: Compute mesh inertia tensor failed for one of the actor’s mesh shapes! Please change mesh geometry or supply a tensor manually!”

Section 4.20.4 Fade in and out of scene loads

Unity Hands-On Fading Loader, Step 2.

Remove the following code:

AsyncOperation async = Application.LoadLevelAsync (levelToLoad);
yield return async;

Replace with:

Application.LoadLevel (levelToLoad);

Note: Application.LoadLevelAsync is only supported in Unity Pro.

Chapter 5

Section 5.2.1

Bejewelled Hands-On Exercise

As of Unity version 4.5 the BoxCollider2D doesn’t work on the smiley face prefabs.  However if you remove the BoxCollider2D from each of the six smiley prefabs and replace them with a CircleCollider2D the code will work as it should.

Chapter 6

Section 6.2.3

Angry Birds Hands-On Exercise

In step 15, piggy.cs is added to the pig gameObject, however the code is still written for 3D.  To modify the OnCollisionEnter should be changed to an OnCollisionEnter2D thus:

void OnCollisionEnter2D(Collision2D collision)