# BatchingStatic

> Combine the GameObject's Mesh with other eligible Meshes, to potentially reduce runtime rendering costs.

## Definition

* **Type:** Field
* **Namespace:** [UnityEditor](/engine/6000.6/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
BatchingStatic = 4
```

### Remarks

For more information, see the documentation on [Static Batching](/engine/6000.6/manual/analysis/graphics-performance-profiling/reduce-draw-calls/draw-call-batching/draw-call-batching.md).

Note that you can use [StaticBatchingUtility.Combine](/engine/6000.6/script-reference/unityengine/staticbatchingutility/combine.md) to combine Meshes that do not have this StaticEditorFlag enabled at runtime.

```csharp
using UnityEngine;
using UnityEditor;
public class StaticEditorFlagsExample
{
    [MenuItem("Examples/Create GameObject and set Static Editor Flags")]
    static void CreateGameObjectAndSetStaticEditorFlags()
    {
        // Create a GameObject
        var go = new GameObject("Example");
        // Set the GameObject's StaticEditorFlags
        var flags = StaticEditorFlags.BatchingStatic;
        GameObjectUtility.SetStaticEditorFlags(go, flags);
    }
}
```

Additional Resources: [GameObjectUtility.SetStaticEditorFlags](/engine/6000.6/script-reference/unityeditor/gameobjectutility/setstaticeditorflags.md), [GameObject.isStatic](/engine/6000.6/script-reference/unityengine/gameobject/isstatic.md), [StaticBatchingUtility.Combine](/engine/6000.6/script-reference/unityengine/staticbatchingutility/combine.md)
