isPartOfStaticBatch
Indicates whether the renderer is part of a static batch with other renderers.
阅读时间1 分钟最后更新于 1 个月前
Definition
- Type: Property
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
public bool isPartOfStaticBatch { get; }
Remarks
Unity sets this flag after it generates the static batch that contains the renderer. Be aware that Unity generates static batches at different times for the Unity Player and Unity Editor:
- Unity Player: Unity generates static batches for renderers in every scene at build time. This means that is always valid in a built application.
Renderer.isPartOfStaticBatch - Unity Editor: Unity builds static batches for renderers in a scene only after it loads the scene in Play mode. This means that is only valid in the Unity Editor while in Play mode after Unity loads the scene that the renderer is in.
Renderer.isPartOfStaticBatch