Version: 2017.2 (switch to 2017.3b)
Tags
Prefabs
Other Versions

Static GameObjects

Many optimisations need to know if an object can move during gameplay. Information about a Static (ie, non-moving) object can often be precomputed in the editor in the knowledge that it will not be invalidated by a change in the object’s position. For example, rendering can be optimised by combining several static objects into a single, large object known as a batch.

The inspector for a GameObject has a Static checkbox and menu in the extreme top-right, which is used to inform various different systems in Unity that the object will not move. The object can be marked as static for each of these systems individually, so you can choose not to calculate static optimisations for an object when it isn’t advantageous.

The Static checkbox and drop-down menu, as seen when viewing a GameObject in the Inspector
The Static checkbox and drop-down menu, as seen when viewing a GameObject in the Inspector

Static Settings

The Everything and Nothing enable or disable static status simultaneously for all systems that make use of it. These systems are:

  • Lightmapping: advanced lighting for a scene;
  • Occluder and Occludee: rendering optimization based on the visibility of objects from specific camera positions;
  • Batching: rendering optimization that combines several objects into one larger object;
  • Navigation: the system that enables characters to negotiate obstacles in the scene;
  • Off-mesh Links: connections made by the Navigation system between discontinuous areas of the scene.
  • Reflection Probe: captures a spherical view of its surroundings in all directions.

See the pages about these topics for further details on how the static setting affects performance.

Did you find this page useful? Please give it a rating:

Tags
Prefabs