BatchingStatic
Combine the GameObject's Mesh with other eligible Meshes, to potentially reduce runtime rendering costs.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Field
- Namespace: UnityEditor
- Assembly: UnityEditor
BatchingStatic = 4
Remarks
For more information, see the documentation on Static Batching.
Note that you can use StaticBatchingUtility.Combine to combine Meshes that do not have this StaticEditorFlag enabled at runtime.
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, GameObject.isStatic, StaticBatchingUtility.Combine