Time for action – creating a lightmap
Lightmaps are a great effect for any game environment, but we need to explicitly tell Unity which objects will not move and then use lightmaps.
- The first thing to do is make our environment meshes static. To do this start by selecting a piece of your city.
- In the top-right corner of the Inspector window to the right of the object name field are a checkbox and a Static label. Checking this box will make the object static.
- Make all of the city's meshes static.
Tip
Instead of selecting each checkbox one by one, if you have any sort of grouping (as we just did for the lights), this step can be completed much faster.
- Select the root object of your city, the one that is the parent to all the pieces of our city, the buildings, ...
Get Unity Android Game Development by Example Beginner's Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.