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.
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, ...