O'Reilly logo

Unity Android Game Development by Example Beginner's Guide by Thomas Finnegan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

  1. The first thing to do is make our environment meshes static. To do this start by selecting a piece of your city.
  2. 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.
  3. 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.

    1. Select the root object of your city, the one that is the parent to all the pieces of our city, the buildings, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required