Skip to content

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 LevelTarget Operations & Impact
SafeConfiguration & 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.
AggressiveBalanced + 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 StepPreset LevelVisual ImpactDescription & Technical Action
1Mark Static SceneryBalancedNoneGameObjects lacking scripts, animators, or physics rigidbodies receive Batching Static and Occluder/Occludee Static flags.
2Generate LODs for Dense MeshesBalancedMinorGenerates LOD1 and LOD2 meshes using the parallel Burst QEM decimator and configures a LODGroup on high-poly models.
3Share MaterialsBalancedNoneReplaces duplicate material instances with a canonical shared material so identical draws batch together.
4Build HLOD for Static AreasAggressiveVisibleReplaces distant static scenery cells with a single simplified, atlased proxy mesh (triggered when static scenery covers $\ge 3$ grid cells).
5Combine Static MeshesAggressiveMinorMerges static renderers outside LOD groups into spatial 40 m grid cells with a synchronized texture atlas; source renderers are disabled, not deleted.
6Cull Small ObjectsBalancedMinorTiny props stop rendering when occupying less than the threshold screen height via single-level LODGroup culling.
7Camera & Layer Distance CullingAggressiveVisibleTrims camera far clip plane to actual scene extents and configures per-layer spherical cull distances on the camera.
8Setup & Bake Occlusion CullingBalancedNoneLarge opaque static geometry is tagged as occluders and background occlusion baking is initialized.
9Shadows & Local Light TrimmingBalancedMinorConfigures shadow distances and cascades to platform guidelines; disables shadows on small local point/spot lights and particles.
10Animation & Particle CullingBalancedNoneConfigures offscreen animators and skinned meshes to stop updating; enables automatic particle culling and reduces collision cost.
11Quality Settings & Texture ClampsAggressiveVisibleSets MSAA, render scale, mobile HDR, pixel lights, and skin weights to profile limits; clamps oversized textures to platform budget.
12Mesh & Texture Memory FlagsAggressiveNoneDisables Read/Write flags on textures and static models and strips unused tangent channels.
13Remaining Scene Doctor FixesOpt-inMinorExecutes all remaining Moderate fixes not covered by steps above (physics, audio, UI, colliders). Disabled by default.
14Safe Import & Render SettingsSafeNoneExecutes 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:

  1. Results Page: Displays a side-by-side snapshot comparison showing draw calls saved, total triangles reduced, and texture VRAM recovered.
  2. 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

  1. Before Benchmark: The benchmark automatically enters Play Mode and samples frame times and graphics statistics from configured camera angles.
  2. Pipeline Execution: Returns to Edit Mode and applies the chosen One-Click preset.
  3. Occlusion Synchronization: If occlusion baking was triggered, the benchmark waits for the background worker to finish (preventing Play Mode from aborting the bake).
  4. After Benchmark: Re-enters Play Mode and re-measures performance from the identical camera viewpoints.
  5. 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:

  1. Attach the BenchmarkViewpointMarker component (Add Component > FuzzyOptimizer > Benchmark Viewpoint) to GameObjects positioned at high-traffic gameplay areas.
  2. 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 to Library/FuzzyOptimizer/Captures/.