
ThreadHarmonizer
Bring Multithreading and Unity Job System Optimization to Unity Scripts
ThreadHarmonizer analyzes your Unity project and helps identify scripts that are suitable for multithreading or Unity Job System optimization.
Instead of blindly rewriting code, ThreadHarmonizer parses your C# syntax, evaluates optimization candidates, and applies controlled transformations only where they are suitable. This keeps the process transparent, repeatable, and safer for Unity projects where main-thread restrictions matter.

Syntax-Aware Optimization
ThreadHarmonizer does not rely on simple text replacement or AI-generated guesses.
It analyzes the structure of your C# scripts, detects optimization opportunities, and helps rewrite suitable code paths for multithreaded execution while respecting Unity’s main-thread limitations.

Main-Thread Safety Diagnostics
Unity APIs and many Unity-specific objects must only be accessed from the main thread.
ThreadHarmonizer now includes a dedicated error detection system for code that attempts to call Unity main-thread-bound functionality from multithreaded functions. This helps identify unsafe access patterns early and makes it easier to understand why certain code cannot be moved into a multithreaded context.

Unity Job System Integration — Beta
ThreadHarmonizer can now automatically integrate Unity’s Job System into suitable optimization candidates.
This feature is currently in beta and will continue to be improved for stability, compatibility, and performance. While the integration is designed to automate as much of the optimization workflow as possible, manual review is still recommended after generated changes are applied.

Safe Rollback
Before generated changes are applied, ThreadHarmonizer creates snapshots of modified files so you can restore the previous state if needed.
This allows you to test generated optimizations with more confidence and revert changes quickly if the result does not fit your project.

Optimized for Unity
ThreadHarmonizer is built around Unity workflows and helps keep Unity-specific operations aligned with main-thread requirements.
It is especially useful for performance-critical scripts where expensive calculations can be moved away from the main thread without breaking Unity API restrictions.
Get Started In Just a Few Minutes…

1. Download
Download and import the Unity package

2. Optimize
Open the Optimizer and start rewriting

3. Run
Experience the difference!
One workflow. The right optimization for each script.
ThreadHarmonizer turns performance work into a deliberate Unity workflow: analyze the whole project, choose the optimization that matches the code, validate the generated result, and keep every change reversible. It is built for teams that want more headroom without treating threading as a blind code conversion.
Multithreading
For suitable MonoBehaviour scripts, ThreadHarmonizer can introduce MonoBehaviourMultithreaded, register a ParallelUpdate path, cache main-thread values on the Unity side, and move only validated calculation work to workers. Unity API reads and writes stay where Unity requires them.
Unity Job System
For data-oriented workloads that can be batched safely, ThreadHarmonizer can plan Unity Jobs with suitable native data, scheduled work, and later synchronization. It avoids a fake job that immediately blocks with Schedule(...).Complete(), and rejects code that cannot be represented safely in a job.
Auto Integration
Auto Integration compares the available paths. It favors Jobs when batching and data layout create a real benefit, Classic Multithreading when Unity-facing structure makes it the stronger choice, and leaves a script alone when the result would not be meaningful.
Designed around Unity safety, not around promises.
ThreadHarmonizer knows that Transform, GameObject, physics, rendering, scene objects, and many Unity APIs are main-thread bound. Its project analysis, compile preflight, meaningfulness checks, and Visual Studio diagnostics make that boundary visible before unsafe worker code reaches your game.
When an isolated calculation really can run away from the main thread, ThreadHarmonizerManager.EnqueueOnWorker and EnqueueOnMainThread provide a clear hand-off. The latter is intentionally for the final Unity-side apply step; it is not a way to bypass Unity’s thread rules.
Start with confidence
- Bootstrap the required runtime manager directly from ThreadHarmonizer. It creates one persistent
ThreadHarmonizerManagerthat survives scene changes and owns the worker and main-thread queues. - Choose Auto, Classic Multithreading, or Unity Job System in the Optimizer.
- Review the generated changes, test in your project, and use built-in snapshots, per-script restore, or source control whenever you want to roll back.
ThreadHarmonizer is for Unity developers who want practical performance improvements with readable generated code, explicit safety boundaries, and a reversible workflow.


