Skip to content

TsukimiSharp Reference

TsukimiSharp is a subset of C# that compiles to Udon, which runs inside VRChat worlds.

PageContents
Quick startFrom installing to your first Behaviour running
PageContents
Finding it by what you want to doFrom what you want to do, jump to the page that shows how
Features UdonSharp does not haveWays of writing and tools this language has that UdonSharp does not
PageContents
Udon’s execution modelHow it runs on Udon, and the reasons behind the restrictions
File layout and namespacesFile layout, namespaces, visibility, name resolution
EventsList of events the runtime calls
Field initialization and defaultsField initializers, and the value when you write none
PageContents
Lexical elements and literalsAll forms of numeric and string literals
List of typesTypes you can use (section below)
Expressions and operatorsOperators, strings, null handling, primary expressions
Type conversionsWhich conversions are supported, type tests, and boxing
Numeric overflow and conversionValues on overflow, and conversions that halt
Null and referencesSources of null and how to handle it safely
Statements and control flowBranching, loops, statement structure
Pattern matchingAll pattern forms and exhaustiveness
Member declarationsAll forms of members you can declare
Variables and passing argumentsKinds of variables, ref / out / in, definite assignment
Extension methodsHow to write static helpers
AttributesList of attributes that have meaning to the runtime
Reactive programmingWriting work that runs when a value changes, on the dependent side
PreprocessorDirectives you can use
PageContents
async / awaitSplit work that does not fit in one frame and advance it piece by piece
Constructs allowed in an async methodLoops, branches and calls allowed in the body of an async method
GPU kernels and awaitBound GPU work by how many times it runs per frame
PageContents
GPU kernelMaking the GPU compute: the kernel’s shape, types, cells and coordinates
Kernel statements and expressionsStatements, operators, and per-type operations available inside a kernel
Functions callable from a kernelBuilt-ins and helper functions callable from a kernel
Running a GPU kernelBuffers, execution, retrieving results
Surface shaders (experimental)Describe what a Renderer draws in C# (experimental)
PageContents
ONNX models (experimental)Bake a trained model in at compile time instead of loading it (experimental)
PageContents
Getting and calling componentsGetting, calling, referencing
Calling Unity and VRChat typesCommon calls, and members you cannot call
SyncSynced variables, ownership, events
Sync designWhat is guaranteed, the failures, and patterns to write
PageContents
TestingRunning a Behaviour and checking it without launching Unity
ProfilerSee the weight of the programs placed in your scene, as static counts and measured counts, in your browser
Exporting to UdonSharpExport a Behaviour written in T# as C# that UdonSharp reads
MCP serverA server for calling the compiler from outside, used from AI clients
SkillsThe instructions an AI client reads, and how to write them out
PageContents
ErrorLooking things up by error number