05. One-Click Optimize
← Previous: Rule Reference | Next: Optimization Tools →
Overview
One-Click Optimize executes an automated, sequentially ordered pipeline of optimization steps across all open scenes as a single, unified, and revertible session.
Open the pipeline from the Overview page button or via the top menu:
Window > Fuzzy Logic Labs > FuzzyOptimizer > One-Click Optimize…Optimization Presets
| Preset Level | Target Operations & Impact |
|---|---|
| Safe | Configuration & Import Tweaks Only: Applies every Safe automated fix (texture compression, 16-bit mesh indices, small shadow casters, SRP Batcher). Guarantees zero visual difference and zero gameplay side-effects. |
| Balanced (Recommended Default) | Safe + Structural Optimizations: Marks non-moving props as static, generates Burst-decimated LOD chains, shares duplicate materials, applies small-object size culling, configures occlusion bakes, and trims shadow and offscreen animation overhead. |
| Aggressive | Balanced + High-Impact Spatial Batching: Executes HLOD generation, mesh combining per grid cell, camera and layer distance culling, platform quality clamp adjustments, and texture/mesh memory stripping. |
The 14-Step Pipeline Architecture
Steps run strictly in the specified order below. Each step belongs to the lowest preset tier that includes it. Before anything runs, an interactive preview dialog lists every step, the exact number of objects affected, and whether the step produces visual changes. You can toggle any step on or off prior to execution:
| # | Pipeline Step | Preset Level | Visual Impact | Description & Technical Action |
|---|---|---|---|---|
| 1 | Mark Static Scenery | Balanced | None | GameObjects lacking scripts, animators, or physics rigidbodies receive Batching Static and Occluder/Occludee Static flags. |
| 2 | Generate LODs for Dense Meshes | Balanced | Minor | Generates LOD1 and LOD2 meshes using the parallel Burst QEM decimator and configures a LODGroup on high-poly models. |
| 3 | Share Materials | Balanced | None | Replaces duplicate material instances with a canonical shared material so identical draws batch together. |
| 4 | Build HLOD for Static Areas | Aggressive | Visible | Replaces distant static scenery cells with a single simplified, atlased proxy mesh (triggered when static scenery covers $\ge 3$ grid cells). |
| 5 | Combine Static Meshes | Aggressive | Minor | Merges static renderers outside LOD groups into spatial 40 m grid cells with a synchronized texture atlas; source renderers are disabled, not deleted. |
| 6 | Cull Small Objects | Balanced | Minor | Tiny props stop rendering when occupying less than the threshold screen height via single-level LODGroup culling. |
| 7 | Camera & Layer Distance Culling | Aggressive | Visible | Trims camera far clip plane to actual scene extents and configures per-layer spherical cull distances on the camera. |
| 8 | Setup & Bake Occlusion Culling | Balanced | None | Large opaque static geometry is tagged as occluders and background occlusion baking is initialized. |
| 9 | Shadows & Local Light Trimming | Balanced | Minor | Configures shadow distances and cascades to platform guidelines; disables shadows on small local point/spot lights and particles. |
| 10 | Animation & Particle Culling | Balanced | None | Configures offscreen animators and skinned meshes to stop updating; enables automatic particle culling and reduces collision cost. |
| 11 | Quality Settings & Texture Clamps | Aggressive | Visible | Sets MSAA, render scale, mobile HDR, pixel lights, and skin weights to profile limits; clamps oversized textures to platform budget. |
| 12 | Mesh & Texture Memory Flags | Aggressive | None | Disables Read/Write flags on textures and static models and strips unused tangent channels. |
| 13 | Remaining Scene Doctor Fixes | Opt-in | Minor | Executes all remaining Moderate fixes not covered by steps above (physics, audio, UI, colliders). Disabled by default. |
| 14 | Safe Import & Render Settings | Safe | None | Executes all remaining Safe fixes across the scene. |
Important Caveat: Step 12
Step 12 removes CPU-side mesh and texture copies to save system RAM. If your game uses custom C# scripts that read raw vertex data (Mesh.vertices) or call Texture2D.GetPixels() at runtime, uncheck Step 12.
Reviewing Results & Instant Revert
Once One-Click Optimize completes:
- Results Page: Displays a side-by-side snapshot comparison showing draw calls saved, total triangles reduced, and texture VRAM recovered.
- One-Click Revert: Click the Revert button on the Results page (or navigate to Scene Doctor
⋯> History) to undo the entire session. Importers, scene hierarchies, and project settings are restored immediately. See History & Revert.
Optimize & Measure FPS (Automated Benchmark)
While edit-mode statistics provide accurate camera-frustum estimates, Optimize & Measure FPS captures physical, runtime hardware performance in Play Mode:
flowchart TD
A["1. Enter Play Mode (Before)"] --> B["2. Sample Viewpoints (Frame Times & Batches)"]
B --> C["3. Exit Play Mode & Execute One-Click Pipeline"]
C --> D["4. Await Occlusion Bake (if active)"]
D --> E["5. Re-Enter Play Mode (After)"]
E --> F["6. Sample Identical Viewpoints"]
F --> G["7. Side-by-Side Comparison & Pixel Delta"]
The 5-Step Automated Workflow
- Before Benchmark: The benchmark automatically enters Play Mode and samples frame times and graphics statistics from configured camera angles.
- Pipeline Execution: Returns to Edit Mode and applies the chosen One-Click preset.
- Occlusion Synchronization: If occlusion baking was triggered, the benchmark waits for the background worker to finish (preventing Play Mode from aborting the bake).
- After Benchmark: Re-enters Play Mode and re-measures performance from the identical camera viewpoints.
- Comprehensive Telemetry: Compares:
- Average Frame Time (ms) & FPS
- CPU Main Thread Time & Render Thread Time
- GPU Frame Time (on supported platforms)
- Batches, SetPass Calls, Draw Calls, and Triangles
- Side-by-side camera viewport captures with an automated visual pixel delta percentage
Placing Benchmark Viewpoints
To customize the vantage points evaluated during the benchmark:
- Attach the
BenchmarkViewpointMarkercomponent (Add Component > FuzzyOptimizer > Benchmark Viewpoint) to GameObjects positioned at high-traffic gameplay areas. - If no markers are present in the scene, the benchmark defaults to capturing four 90-degree cardinal views from the
MainCamera.
Sampling Parameters
- Warm-up Frames: 30 frames are discarded per viewpoint to ensure shader variants and assets are fully resident in GPU memory.
- Sample Window: 2.0 seconds of high-precision sampling per viewpoint with the application framerate uncapped (
Application.targetFrameRate = -1). - Camera Locking: The camera pose is locked every frame to prevent gameplay camera scripts from drifting during sampling.
- Storage: Benchmark results are saved to
Library/FuzzyOptimizer/Benchmarks/and screen captures toLibrary/FuzzyOptimizer/Captures/.