- Never use emdashes (
—). Rephrase instead.
- README.md: Architecture, HTTP API, build commands, development workflow.
- docs/LEARNINGS.md: Dead-end approaches and hard-won lessons. Read the "DEAD END" sections before attempting alternative inspection APIs. Multiple approaches (RunLocalInspections for C++, ForceReHighlight for non-open files, SolutionAnalysisManager as a component) were fully explored and proven not to work.
- docs/ue-companion-plugin.md: Blueprint audit architecture, explaining how the Rider plugin and UE companion plugin couple via filesystem conventions.
This plugin accesses closed-source JetBrains APIs via reflection. Key pitfalls:
GetComponent<T>()is an extension method, not an instance method onISolution. You must search interfaces, base types, then scan assemblies for static extension methods.ResolveComponent(Type)helper exists for component resolution when generic type parameters don't work at runtime.- Type names may differ from guesses. Use diagnostic dumps (stderr or HTTP response with
&debug=true) when debugging reflection failures. - Blueprint APIs (
UE4AssetsCache,UE4SearchUtil) are accessed via reflection onJetBrains.ReSharper.Feature.Services.Cpp.dllwith no compile-time reference.
Two approaches are used, depending on the need:
- Lightweight: Check for
.uprojectfiles in the solution directory. Fast, no reflection needed. - Full info:
GetUEProjectInfo()viaICppUE4SolutionDetectorreflection. Returns engine path, project path, target platform. Engine path comes fromUnrealContext.Pathproperty.
When the Rider plugin spawns UnrealEditor-Cmd.exe -run=BlueprintAudit, it looks for "unknown commandlet" patterns in the process output to detect whether the companion UE plugin is installed. If the commandlet isn't registered (plugin not installed), the output contains this pattern and the refresh fails gracefully.
- Audit schema version must match between
BlueprintAuditService.AuditSchemaVersion(this repo) andFBlueprintAuditor::AuditSchemaVersionin the Fathom-UnrealEngine repo. Bump both together. - Audit output path:
Saved/Fathom/Audit/v<N>/.... Version segment must match on both sides. - Audit version manifest:
BlueprintAuditService.ResolveAuditDir()readsSaved/Fathom/audit-manifest.json(written by the UE plugin) to discover the correct version directory. Falls back to the hardcodedv<N>path when the manifest is absent, preserving backward compatibility.
.\scripts\setup.ps1 # First-time only
.\gradlew.bat :compileDotNet # Compile
.\gradlew.bat :runIde # Launch sandbox Rider with plugin