Compute()
Bakes static occlusion culling data for the loaded scenes and waits until the bake finishes.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Method
- Namespace: UnityEditor
- Assembly: UnityEditor.CoreModule
public static bool Compute()
Returns
Type | Description |
|---|---|
| bool | Returns |
Remarks
This method blocks the Editor until the bake finishes. If a bake started with StaticOcclusionCulling.GenerateInBackground is running, this method cancels it first.
Use this method when a script needs the occlusion data before it continues, for example in a build callback such as IPreprocessBuildWithReport.OnPreprocessBuild. The bake marks the affected scenes as modified, so save them afterwards to include the new data in the build.
Additional Resources: StaticOcclusionCulling.GenerateInBackground, StaticOcclusionCulling.Clear.