{"id":13662924,"url":"https://github.com/needle-tools/compilation-visualizer","last_synced_at":"2025-04-12T23:39:23.798Z","repository":{"id":40895011,"uuid":"286530671","full_name":"needle-tools/compilation-visualizer","owner":"needle-tools","description":"Unity Tool showing a timeline of assembly compilation. This is especially helpful when trying to optimize compile times and dependencies between assemblies. Besides showing a graphical view of compilation, selecting an assembly shows both dependencies and dependents of that assembly.","archived":false,"fork":false,"pushed_at":"2023-08-22T07:50:56.000Z","size":88,"stargazers_count":950,"open_issues_count":3,"forks_count":38,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-04-12T23:39:17.899Z","etag":null,"topics":["assembly","compact","compilation-visualizer","unity"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/needle-tools.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-08-10T16:51:48.000Z","updated_at":"2025-04-10T22:02:34.000Z","dependencies_parsed_at":"2024-01-11T14:25:59.821Z","dependency_job_id":null,"html_url":"https://github.com/needle-tools/compilation-visualizer","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/needle-tools%2Fcompilation-visualizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/needle-tools%2Fcompilation-visualizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/needle-tools%2Fcompilation-visualizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/needle-tools%2Fcompilation-visualizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/needle-tools","download_url":"https://codeload.github.com/needle-tools/compilation-visualizer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647255,"owners_count":21139081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assembly","compact","compilation-visualizer","unity"],"created_at":"2024-08-02T05:02:12.240Z","updated_at":"2025-04-12T23:39:23.774Z","avatar_url":"https://github.com/needle-tools.png","language":"C#","funding_links":[],"categories":["GamePlay","C\\#","C#"],"sub_categories":["HUD"],"readme":"# Compilation Visualizer for Unity\n\n![Unity Version Compatibility](https://img.shields.io/badge/Unity-2018.4%20%E2%80%94%202022.1-brightgreen) [![openupm](https://img.shields.io/npm/v/com.needle.compilation-visualizer?label=openupm\u0026registry_uri=https://package.openupm.com)](https://openupm.com/packages/com.needle.compilation-visualizer/)\n\n## What's this?\nThis tool visualizes the assembly compilation process in Unity3D. It hooks into the Editor-provided events and nicely draws them on a timeline. That's especially helpful when trying to optimize compile times and dependencies between assemblies.  \n\nBesides showing a graphical view of compilation, selecting an assembly shows both dependencies and dependents of that assembly.  \n\nThe screenshots show full compilations; but the timeline works as well for partial compilations (e.g. you changed a single script and Unity only recompiles the relevant parts of the dependency chain).\n\n## Quick Start\n\nCompilation Visualizer is available on OpenUPM: https://openupm.com/packages/com.needle.compilation-visualizer/  \n\nIf you're on Unity 2019.4+:\n- open `Edit/Project Settings/Package Manager`\n- add a new Scoped Registry or add the package to the existing OpenUPM scope:\n  ```\n  Name: OpenUPM\n  URL:  https://package.openupm.com/\n  Scope(s): com.needle.compilation-visualizer\n  ```\n- click \u003ckbd\u003eSave\u003c/kbd\u003e\n- open Package Manager\n- click \u003ckbd\u003e+\u003c/kbd\u003e\n- select \u003ckbd\u003eAdd from Git URL\u003c/kbd\u003e\n- paste `com.needle.compilation-visualizer`\n- click \u003ckbd\u003eAdd\u003c/kbd\u003e.\n\nYou can open the **Compilation Visualizer** by selecting `Window \u003e Analysis \u003e Compilation Timeline`. It will automatically update whenever something is compiled.  \n\n![Compilation Process](https://github.com/needle-tools/compilation-visualizer/wiki/images/compact-view-recompile.gif)\n\n### Recompile\nIf you want to trigger a recompile, you can either use the \u003ckbd\u003eRecompile\u003c/kbd\u003e button, or `Right Click \u003e Reimport` a script or folder with scripts to cause that to be recompiled.  \n\nYou can also compile **player scripts only**, by clicking \u003ckbd\u003eCompile Player Scripts\u003c/kbd\u003e. Use the dropdown button to switch to another platform.  \n\nOn 2021.2+, Unity changed how compilation results are cached. The \u003ckbd\u003eRecompile\u003c/kbd\u003e and \u003ckbd\u003eCompile Player Scripts\u003c/kbd\u003e will clear those caches to allow measuring a full compilation run.  \n\n### Navigation\n\n\u003ckbd\u003eLeft Click\u003c/kbd\u003e to select a specific assembly. This will show dependencies and dependants.  \n\u003ckbd\u003eHover\u003c/kbd\u003e over an assembly to get additional details.  \n\u003ckbd\u003eAlt + Scroll Wheel\u003c/kbd\u003e to zoom in/out.  \n\u003ckbd\u003eAlt + Right Click\u003c/kbd\u003e to reset zoom.  \n  \n\u003ckbd\u003eCompact\u003c/kbd\u003e will toggle between a waterfall view of all assemblies, and a compact collapsed view that tries to save space.  \n\u003ckbd\u003eLogging\u003c/kbd\u003e turns on a lot of extra logs that will be put into the Console when clicking on an assembly.  \n\u003ckbd\u003eShow Reloads\u003c/kbd\u003e adds an extra section in the timeline to see how much time went into compilation and how much into the following Domain Reload.  \n\n### EditMode tests\n\nCompilation Visualizer can run edit mode tests to ensure your project compiles on all platforms, catching common mistakes with ifdefs and API compatibility.  \nTo use these tests, simply add it to the \"testables\" section in your project manifest.json:  \n```\n  \"testables\": [\n    \"com.needle.compilation-visualizer\"\n  ],\n```\n\nThen, when you open `Window \u003e General \u003e Test Runner` you can click \u003ckbd\u003eRun All\u003c/kbd\u003e or double-click `CompilePlayerScripts`.  \n\n![EditMode Tests](https://github.com/needle-tools/compilation-visualizer/wiki/images/editmode-tests.png)\n\n## Screenshots\n![Compilation Process](https://github.com/needle-tools/compilation-visualizer/wiki/images/expanded-view-recompile.gif)\n![Coloring Options](https://github.com/needle-tools/compilation-visualizer/wiki/images/coloring-options.gif)\n![Compact View](https://github.com/needle-tools/compilation-visualizer/wiki/images/compact-view.png)\n![Compact View with selected assembly](https://github.com/needle-tools/compilation-visualizer/wiki/images/compact-view-selection.png)\n![Expanded View](https://github.com/needle-tools/compilation-visualizer/wiki/images/expanded-view.png)\n![Expanded view with selected assembly](https://github.com/needle-tools/compilation-visualizer/wiki/images/expanded-view-selection.png)\n\n## Compatibility to 2018.4, 2019.1, 2019.2\nWhile most functionality works great those versions, some minor things are different:\n- slightly less accurate total compilation time on 2018.4 — 2019.1+ has events for the entire compilation while on 2018.4 the last finished assembly compilation is used as end date.\n- no PackageInfo for now on 2018.4/2019.1 as `PackageInfo.FindForAsset` doesn't exist.  \n\n## Known Issues\n\nOn 2021.2, sometimes `UnityEditor.UI.dll` and `UnityEditor.TestRunner.dll` are included in Player Builds for reasons.  \n\n## Contact\n\u003cb\u003e[needle — tools for unity](https://needle.tools)\u003c/b\u003e • \n[@NeedleTools](https://twitter.com/NeedleTools) • \n[@marcel_wiessler](https://twitter.com/marcel_wiessler) • \n[@hybridherbst](https://twitter.com/hybridherbst)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneedle-tools%2Fcompilation-visualizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneedle-tools%2Fcompilation-visualizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneedle-tools%2Fcompilation-visualizer/lists"}