A guide for coding with UdonSharp. Use this when you are asked to create or edit UdonSharp programs. Code that inherits from UdonSharpBehaviour falls under UdonSharp code.
Ships in kurotori4423-udonsharp-coding-skill. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
UdonSharp generally follows C# syntax, but its features are limited.
if, else, while, for, do, foreach, switch, return, break, continue, ternary operator (condition ? true : false), ??(true || CheckIfTrue()) will not execute CheckIfTrue()typeof()out or ref parameters, such as many variants of Physics.Raycast()paramsOnPlayerJoined event with a VRCPlayerApi argument is valid.[RecursiveMethod] attribute[] collections and by extension UdonSharp only supports arrays at the moment..GetType() will not always match what you may expect since U# abstracts some types in order to make them work in Udon. For instance, any jagged array type will return a type of object[] instead of something like int[][] for a 2D int jagged array.You cannot create a new GameObject using new GameObject() and similar APIs. In UdonSharp, you create new objects by cloning an existing GameObject in the scene using Instantiate(). Additionally, only GameObject can be instantiated via Instantiate().
Utilities.IsValid for null checksbool IsValid(object obj) returns true when obj is not null (or is otherwise valid). In UdonSharp, this is faster than doing null checks with ==.
If you need to generate GameObjects or UdonBehaviour components during scene build processing, read references/build_time_scene_generation.md. For a Japanese human-readable explanation of the same guidance, read references/build_time_scene_generation.ja.md.
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
public class UdonSharpScript : UdonSharpBehaviour
{
}
If the problem you are addressing involves network synchronization, read the document references/en/udon_network/README.md. These documents describe the concepts and methods required to implement network logic in Udon.
If you need shared logic, encapsulation, or inheritance, be aware that UdonSharp has important limitations. See references/en/udon_class.md.
If you are implementing things like gaze-following objects or objects that follow avatar bones, see references/en/udon_playerTracking.md. It includes important notes and pitfalls for implementation.
If you need to save player-specific data (like high scores, inventory, or settings) across sessions or instances, refer to references/en/udon_persistence.md. This document explains how to use PlayerData and PlayerObjects for persistent storage.
If you need to retrieve text/JSON data or images from external servers at runtime, see references/en/udon_stringLoading.md and references/en/udon_imageLoading.md. These documents explain how to use VRCStringDownloader and VRCImageDownloader with their respective callbacks and limitations.
If you need to implement player-interactable UI with Unity uGUI components such as Canvas, Button, Slider, Toggle, ScrollRect, or InputField/TMP_InputField, read references/en/udon_uGUI.md. This document explains how uGUI events must target the UdonBehaviour component and call UdonBehaviour.SendCustomEvent instead of directly assigning UdonSharp callbacks, how to read UI values from Inspector references, and which VRChat-specific Canvas and navigation settings are required.
If you need to handle in-game purchases, check product ownership, or utilize the VRChat Creator Economy SDK, refer to references/en/udon_creatorEconomy.md. This document explains how to use UdonProduct, the Store methods, and purchase events in UdonSharp.
references/build_time_scene_generation.ja.md (opens in a new tab)references/build_time_scene_generation.md (opens in a new tab)references/en/udon_class.md (opens in a new tab)references/en/udon_creatorEconomy.md (opens in a new tab)references/en/udon_imageLoading.md (opens in a new tab)references/en/udon_network.md (opens in a new tab)references/en/udon_network/01_basics_minimum.md (opens in a new tab)references/en/udon_network/02_implementation.md (opens in a new tab)references/en/udon_network/03_sync_options.md (opens in a new tab)references/en/udon_network/04_synced_types.md (opens in a new tab)references/en/udon_network/05_design_tips.md (opens in a new tab)references/en/udon_network/README.md (opens in a new tab)references/en/udon_persistence.md (opens in a new tab)references/en/udon_playerTracking.md (opens in a new tab)references/en/udon_stringLoading.md (opens in a new tab)references/en/udon_uGUI.md (opens in a new tab)references/jp/Troubleshooting.md (opens in a new tab)references/jp/udon_class.md (opens in a new tab)references/jp/udon_creatorEconomy.md (opens in a new tab)references/jp/udon_imageLoading.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
/kurotori4423-udonsharp-coding-skill:udonsharp-codingfrom kurotori4423-udonsharp-coding-skill
kurotori4423-udonsharp-coding-skill@cascade-code-languages-misc-2 is listed by joshuarweaver/cascade-code-languages-misc-2 — review the source before installing
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-2 --plugin kurotori4423-udonsharp-coding-skill