You can get UdonSharp by using the VRChat Creator Companion (also known as the VCC), its CLI, or a starter template.
Create a new UdonSharp project with the VCC:
- Install the latest version of the Creator Companion.
- From the main screen, select "New", then "UdonSharp", and choose a directory.
- Press "Open Project". That's it!
Create a new UdonSharp Project with Source Control:
- Visit the UdonSharp Project Template repository.
- Press "Use this template".
- Clone the project to your computer using your favorite Git client.
- Open the project directly in Unity, or add it to the VCC for easy access and updating later.
Add UdonSharp to an existing Udon Project:
- Add the project to the VCC, migrating it if necessary.
- Select the project from the Projects listing screen.
- In the Repo dropdown above the Package listings, ensure "Curated" is selected.
- Find UdonSharp in the listed packages and press "Add".
Create or Add UdonSharp with the CLI
The CLI is a tool for advanced users, and the best way to manage VPM projects on non-Windows systems for now.
- Make a new object in your scene
- Add an Udon Behaviour component to your object
- Below the "New Program" button click the dropdown and select "Udon C# Program Asset"
- Now click the New Program button, this will create a new UdonSharp program asset for you
- Click the Create Script button and choose a save destination and name for the script.
- This will create a template script that's ready for you to start working on, open the script in your editor of choice and start programming
Asset explorer asset creation
Instead of creating assets from an UdonBehaviour you can also do the following:
- Right-click in your project asset explorer
- Navigate to Create > U# script
- Click U# script, this will open a create file dialog
- Choose a name for your script and click Save
- This will create a .cs script file and an UdonSharp program asset that's set up for the script in the same directory