Giter VIP home page Giter VIP logo

udonsharp's Introduction

UdonSharp

UdonSharp is a compiler that translates C# to Udon assembly, so you can create interactive VRChat worlds by writing C# code.

You can find the full docs at https://udonsharp.docs.vrchat.com.

⚠️ IMPORTANT! ⚠️

The old 0.x version of UdonSharp which used to be delivered as a .unitypackage is deprecated and no longer supported. You can use the Creator Companion to migrate your projects to this new version and keep it updated moving forward.

Requirements

  • Unity 2019.4.31f1
  • VRChat World SDK (can be automatically resolved, see below)

Getting Started

If you're comfortable using GitHub, follow the directions in the UdonSharp Template repo to quickly make your own ready-to-use repository. Otherwise, you can download the VRChat Creator Companion, and then choose Projects > New > UdonSharp to create a new ready-to-use Unity Project.

Use Unity 2019.4.31.f1 to open the project. Press "OK" on the dialog that offers to download the required VRChat packages.

image

Loading the Example World

Find the "VRChat SDK" item in the menu bar at the top of the Unity Editor window, press it to open, then choose "Samples > UdonExampleScene".

samples-udonexample-scene

Once the scene opens, choose "File > Save As..." and give the scene a new name.

Then modify the scene however you'd like - you learn about all the examples in the UdonExampleScene or learn about Getting Started with Udon.

Making your own Scripts

  1. Make a new object in your scene

  2. Add an Udon Behaviour component to your object

  3. Below the "New Program" button click the dropdown and select "Udon C# Program Asset"

  4. Now click the New Program button, this will create a new UdonSharp program asset for you

  5. Click the Create Script button and choose a save destination and name for the script.

  6. 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.

    Instead of creating assets from an UdonBehaviour you can also do the following:

  7. Right-click in your project asset explorer

  8. Navigate to Create > U# script

  9. Click U# script, this will open a create file dialog

  10. Choose a name for your script and click Save

  11. This will create a .cs script file and an UdonSharp program asset that's set up for the script in the same directory

Test Your World

When you're ready to try out your World, find and choose the menu item "VRChat SDK > Show Control Panel".

  • Sign into your VRChat Account in the "Authentication" tab.
  • Switch to the "Builder" tab and choose "Build & Test".
  • After a quick build process, VRChat should open up in your test world!
  • If you have any issues making a test world, check out our docs on Using Build & Test.

Publish Your World

When you're ready to publish your World so you can use it regularly:

  • Return to the VRChat SDK Control Panel in your Unity Project
  • Switch to the "Builder" tab and press "Build and Publish for Windows".
  • This will build your World and add some publishing options to your Game window.
  • Fill out the fields "World Name", "Description" and "Sharing", and check the terms box "the above information is accurate...".
  • Press "Upload".

Return to VRChat - open the "Worlds" menu, then scroll down to the section named "Mine". Choose your world from the list and press "Go" to check it out!

Visual Studio Code Integration

You can follow this video guide to get Intellisense for C# within your Unity project in Visual Stido Code (VS Code), inlcuding libraries such as UdonSharp.

Credits

  • See CONTRIBUTORS.md for people who have helped provide improvments to UdonSharp
  • The open source project Harmony helps Udonsharp provide a better editor experience

Discord

udonsharp's People

Contributors

merlinvr avatar momo-the-monster avatar faxmashine avatar ureishi avatar bdunderscore avatar mika-f avatar forwrya avatar phaxenor avatar toocanzs avatar norkel-vrc avatar chanyavrc avatar fairlysadpanda avatar happyrobot33 avatar orels1 avatar float3 avatar cnlohr avatar arne-van-der-lei avatar reimajo avatar abbodarr avatar hogashi avatar greedboy-55 avatar hyblocker avatar nathanc avatar nestorboy avatar pema99 avatar shaundreclin avatar simonknittel avatar unihedro avatar anatawa12 avatar norkel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.