A collection of analyzers, refactorings, and code-fixes for UdonSharp, powered by Roslyn.
Analyze your UdonSharp (or other C#/VB implementation of Udon) source code and report diagnostics such as compilation errors, unexpected behavior, and more in real-time. Example diagnostics include:
- Detecting the use of unsupported APIs in Udon and suggesting alternatives.
- Identifying potential performance issues specific to Udon and recommending optimizations.
- Highlighting common pitfalls in UdonSharp coding practices and providing best practice suggestions.
- Detecting mismatches between SendCustomEvent calls and their corresponding event handlers.
This extension is a feature of the Roslyn C# compiler and can be used with any type of editor.
Officially supported editors are following:
- Visual Studio 2019 (Community, Pro, Enterprise)
- Visual Studio 2022 (Community, Pro, Enterprise)
- Visual Studio 2026 (Community, Pro, Enterprise)
- Visual Studio Code
- JetBrains Rider
- C# DevKit
You can also run it from outside of the editor. The following execution methods are supported:
- Unity Integration
- Download the latest
.unitypackagefrom the Releases. - Import the package into your Unity project
- Done!
- Open the VRChat Creator Companion
- Import repository:
https://remuria.natsuneko.com/repositories/com.natsuneko.vpm.worlds.json - Search for
Udon Analyzerand install it - Done!
MIT by @6jz
- Clone the repository
- Create the your changes
- Test your changes
- Submit a pull request
- Install the Unity 2022.3.22f1 via Unity Hub
- Create a Unity Project that have VRChat SDK Worlds installed (requires >= 3.8.2)
- Generate Solution by the Visual Studio Tools for Unity (VSTU), for Visual Studio (DO NOT CREATE IT FOR VISUAL STUDIO CODE)
- Set the Environment Variable
UDON_ANALYZER_TARGET_PROJECTfor<path to your Unity project>/Assembly-CSharp.csproj - Test your changes
- Build the solution
- Run
bin/docgen.exe .
