Loading...
Loading...
UdonSharp (C# to Udon Assembly) scripting skill for VRChat world development. Use this skill when writing, reviewing, or debugging UdonSharp C# code. Covers compile constraints (List<T>/async/await/try/catch/LINQ blocked), network sync (UdonSynced, RequestSerialization, FieldChangeCallback, NetworkCallable), persistence (PlayerData/PlayerObject), Dynamics (PhysBones, Contacts), Web Loading, and event handling. SDK 3.7.1 - 3.10.2 coverage. Triggers on: UdonSharp, Udon, VRC SDK, UdonBehaviour, UdonSynced, NetworkCallable, VRCPlayerApi, SendCustomEvent, PlayerData, PhysBones, synced variables, VRChat world scripting, C# to Udon.
npx skill4agent add niaka3dayo/agent-skills-vrc-udon unity-vrc-udon-sharpList<T>async/awaittry/catchRequestSerializationudonsharp-constraints.mdSetOwnerRequestSerializationudonsharp-sync-selection.mdOnDeserialization[FieldChangeCallback]SendCustomEventUpdate()| Rule File | Contents |
|---|---|
| Blocked features, code generation rules, attributes, syncable types |
| Ownership, sync modes, RequestSerialization, NetworkCallable |
| Sync pattern selection, data budget, minimization principles |
After installation, place these in the agent's rules directory for automatic loading.
| SDK Version | Key Features |
|---|---|
| 3.7.1 | Added |
| 3.7.4 | Added Persistence API (PlayerData/PlayerObject) |
| 3.7.6 | Multi-platform Build & Publish (PC + Android simultaneously) |
| 3.8.0 | PhysBone dependency sorting, Drone API (VRCDroneInteractable) |
| 3.8.1 | |
| 3.9.0 | Camera Dolly API, Auto Hold pickup simplification |
| 3.10.0 | VRChat Dynamics for Worlds (PhysBones, Contacts, VRC Constraints) |
| 3.10.1 | Bug fixes and stability improvements |
| 3.10.2 | EventTiming extensions, PhysBones fixes, shader time globals |
Note: SDK versions below 3.9.0 are deprecated as of December 2, 2025. New world uploads are no longer possible.
| Scenario | Action |
|---|---|
| New SDK version support | Check official docs for latest API |
| "Is this possible?" questions | Verify feasibility in official docs |
| Unknown errors | Refer to official troubleshooting |
| New feature usage | Retrieve latest code examples |
# Official documentation search
WebSearch: "feature or API name site:creators.vrchat.com"
# UdonSharp API reference
WebSearch: "API name site:udonsharp.docs.vrchat.com"
# Error investigation: VRChat official forums
WebSearch: "error message site:ask.vrchat.com"
# Error investigation: Canny (bug reports / known issues)
WebSearch: "error message site:feedback.vrchat.com"
# Error investigation: GitHub Issues
WebSearch: "error message UdonSharp site:github.com"| Resource | URL | Contents |
|---|---|---|
| VRChat Creators | creators.vrchat.com/worlds/udon/ | Official Udon / SDK documentation |
| UdonSharp Docs | udonsharp.docs.vrchat.com | UdonSharp API reference |
| VRChat Forums | ask.vrchat.com | Q&A, solutions |
| VRChat Canny | feedback.vrchat.com | Bug reports, known issues |
| GitHub | github.com/vrchat-community | Samples and libraries |
| File | Contents | Search Hints |
|---|---|---|
| C# feature availability in UdonSharp; blocked features; syncable types; attributes | List, async, try/catch, LINQ, generics, DataList, DataDictionary |
| Ownership model, sync modes, RequestSerialization, NetworkCallable, network events, data limits | UdonSynced, SetOwner, BehaviourSyncMode, FieldChangeCallback, OnDeserialization, master leave, ownership cascade |
| Bandwidth throttling, bit packing, synced data size examples, debugging, owner-centric architecture | IsClogged, bandwidth, throttle, bit packing, data budget, IsMaster |
| 6 anti-patterns to avoid; 5 advanced sync patterns with template links | anti-pattern, race condition, ownership fight, late-joiner, PackedStateSync, BatchedSync |
| PlayerData/PlayerObject API (SDK 3.7.4+); per-player save data | PlayerData, PlayerObject, OnPlayerRestored, SetInt, TryGetInt |
| PhysBones, Contacts, VRC Constraints (SDK 3.10.0+) | PhysBone, ContactReceiver, ContactSender, VRCConstraint, OnContactEnter |
| Initialization, interaction, player detection, timer, audio, pickup, animation, UI, teleportation, lazy init guard | Interact, OnEnable, Initialize, AudioSource, VRCPickup, Animator, UI, TeleportTo |
| Object pooling, NetworkCallable patterns, persistence integration, dynamics integration, synced game state, delayed event debounce | pool, MasterManagedPlayerPool, NetworkCallable, DamageReceiver, game state, debounce, state machine |
| Partial class pattern, update handler, PostLateUpdate, spatial query, platform optimization | Update, PostLateUpdate, Bounds, AnimatorHash, performance, mobile, PC |
| Array helpers (List alternatives), event bus, GameObject relay communication | ArrayUtils, EventBus, relay, subscriber, FindIndex, ShuffleArray |
| String/Image downloading, VRCJson, Trusted URLs | VRCStringDownloader, VRCImageDownloader, VRCJson, DataDictionary, VRCUrl |
| VRCPlayerApi, Networking, enums reference | GetPlayers, playerId, isMaster, isLocal, GetPosition, SetVelocity, Drone, VRCDroneApi |
| All Udon events (including OnPlayerRestored, OnContactEnter) | OnPlayerJoined, OnPlayerLeft, OnPlayerTriggerEnter, OnOwnershipTransferred |
| Editor scripting and proxy system | UdonSharpEditor, UdonSharpBehaviourProxy, SerializedObject |
| Sync pattern examples (Local/Events/SyncedVars) | Continuous, Manual, NoVariableSync, sync example |
| Common errors and solutions | NullReference, compile error, sync not working, FieldChangeCallback |
| SDK migration guide (3.7 to 3.10), version-by-version changes and checklists | migration, deprecated, upgrade, 3.7, 3.8, 3.9, 3.10 |
assets/templates/| Template | Purpose |
|---|---|
| Interactive object with |
| Network-synced object (Manual sync, ownership guard, late-joiner init flag) |
| Per-player movement settings (walk/run/jump speed) |
| State machine with synced state and transitions |
| PlayerData save/load with OnPlayerRestored (SDK 3.7.4+) |
| Contact receiver for world-side collision detection (SDK 3.10.0+) |
| Custom editor inspector with UdonSharpEditor |
| Master-managed player object pool; FIFO ring buffer; OnPlayerJoined/Left; VerifyAssignments after master handoff |
| Subscriber list event bus (max 32 listeners); RegisterListener/UnregisterListener/RaiseEvent; in-place compaction |
| List<T> alternatives: Add, Contains, AddUnique, Remove, RemoveAt, Insert for GameObject[]; FindIndex/ShuffleArray for int[] |
| History/undo sync with byte[] state history; NetworkCallable OwnerProcessMove/OwnerUndo/OwnerReset |
| Pack 3 ints into one Vector3 UdonSynced field; OnPreSerialization/OnDeserialization |
| 0.15s sync cooldown with _syncLocked/_changeCounter; _OnSyncUnlock callback |
| Local + synced copy with _dirty flag; strict OnPreSerialization/OnDeserialization separation |
| Idempotent ScheduleBatchedSync with 0.2s BatchDelay; _FlushBatch delayed callback |
| Networking.IsClogged check; linear back-off (RetryDelay * retryCount); MaxRetries=5 |
| Hook | Platform | Purpose |
|---|---|---|
| Windows (PowerShell) | PostToolUse constraint validation |
| Linux/macOS (Bash) | PostToolUse constraint validation |
CHEATSHEET.md