Recently, a reader sent me the following screenshot which shows a corrupted scene from my book’s demo project.
He also showed me the errors and warning he get when running the demo project:
Lightmap snapshot ‘LightmapSnapshot’ is inconsistent – 62 files out of 248 are missing. Realtime GI will be disabled. Please rebuild lighting for this scene.
Failed setting triangles. Some indices are referencing out of bounds vertices. IndexCount: 600, VertexCount: 11191
Failed setting triangles. Some indices are referencing out of bounds vertices. IndexCount: 96, VertexCount: 11191
This happens when Unity tries to convert the demo project to the latest version, which sometimes might mess up the files.
To solve this issue, reimport the mesh which has been corrupted by the conversion (in this case, terrain and rocks) by right clicking on the asset in Unity and choose “Reimport”, or delete the prefabs from the scene and place it again manually.
Once you have done the steps above, re-bake the lighting again and everything will work fine.