Scene Pilot Pro Bridge

intermediate feature

Editor Doctor Pro · Features

Scene Pilot Pro Bridge

The SPP Bridge connects Editor Doctor Pro to Scene Pilot Pro. When both products are installed, every SPP ISceneCheck runs across every scene in the project plus every prefab whose check class is decorated as prefab-safe. The findings surface in the Doctor's Scenes tab alongside native EDP checks.

How the bridge is gated

The bridge code lives in a separate asmdef (EditorDoctorPro.Editor.SPPBridge) gated by the scripting define EDP_SPP_PRESENT. Unity sets the define automatically via the asmdef's versionDefines entry when ScenePilotPro.Editor is present in the project; remove SPP and the define clears on the next recompile.

Net result:

  • SPP installed - the bridge asmdef compiles, the Doctor exposes the Scenes tab, and the next scan runs every bridged check.
  • SPP not installed - the bridge asmdef is excluded from compilation entirely. The Doctor hides the Scenes tab. No compile errors, no orphan references, no manual define management.
No toggle. There is no user-visible switch to enable or disable the bridge; presence of SPP is the trigger. If you want the bridge off while SPP stays installed, remove SPP, or open the SPP bridge asmdef and tighten defineConstraints to a custom define you control.

How EDP detects SPP

The SPPDetector probe (in Core) reflects on three SPP types - ISceneCheck, SPPContext, CheckResult - using System.Type.GetType. The probe does not reference SPP at the asmdef level, so EDP's Core assembly stays linkable even when SPP is missing. The Doctor uses the probe to decide whether to draw the Scenes tab and which scan path to take.

What the bridge runs

The bridge runs in two phases per scan, driven by SPPProjectScanCache:

  1. Scene pass. The bridge enumerates the scenes the Doctor's scope picker resolves (Build Settings scenes by default, or every .unity under Assets/ with Include All Scenes on). For each scene, it opens the scene with EditorSceneManager.OpenScene, builds an SPPContext, and runs every discovered ISceneCheck. Results are collected per check ID. The previously-loaded scene set is snapshotted at start and restored at end.
  2. Prefab pass. Only checks whose class is annotated with the SPP [BridgeAppliesToPrefabs] attribute participate. The bridge enumerates every prefab the scope picker resolves, loads each via PrefabUtility.LoadPrefabContents, builds a synthetic SPPContext with the prefab root as the only scene root, runs the prefab-safe checks, and unloads. Whether your specific SPP install has 5, 12, or 30 prefab-safe checks depends on the SPP version you have installed - look at the checksRun array in the JSON report after a scan to see the exact set.

Results map to EDP findings under the Scenes category. Severity inherits from the SPP check; fix tier maps conservatively to Manual because in-scene fixes cross product boundaries and EDP's auto-fix contract requires same-asmdef ownership.

Pre-flight, cancel and cost

The bridge aborts pre-flight if any scene currently loaded in the editor is dirty or untitled. A dialog explains why and lists the scenes you need to save (or close) first - the bridge needs a clean snapshot so it can restore the editor's scene set at the end.

Once running, the bridge respects the Doctor's Cancel button: cancellation kicks in between scenes and between prefabs so worst-case the user waits for the current scene's checks to finish. The first scan dominates wall-clock time: opening 30+ scenes sequentially takes a while. Subsequent scans hit the per-scan cache.

Suppression and severity overrides

Bridged findings carry the SPP CheckId as their EDP rule id. Suppress them and override their severity exactly like native EDP findings (via the Doctor row context menu or the Settings Rules / Suppression tabs).

Discoverability: If the Doctor shows the Scenes tab but no findings after a scan, confirm SPP is actually loading checks: look for the checksRun array under the scan object in a JSON report. An empty array means SPP discovered zero checks (broken SPP install); a non-empty array with zero issues means your scenes are clean.
Was this page helpful?