Skip to content

How to start coding

Integrating with a code editor

You need a code editor, such as Visual Studio Code, to write and edit your script. This document takes Visual Studio Code as an example.

  1. Download Visual Studio Code.

  2. Specify the external code editor as Visual Studio Code in Studio Preference.



  3. Find Code in the folder where the Visual Studio Code is located and open it. Now Studio is integrated with the code editor.

Creating or adding scripts

  1. Open any space in YAHAHA Desktop.
  2. In the scene, choose the object that you want to write scripts for and click the More button on the upper right corner.
  3. In the Properties window, click the drop-down arrow on the +Component button. You can either upload your local script by choosing Add Client script or create a script from scratch by choosing Add Lua script.

    Add script

  4. Click the Edit button to edit your script in your code editor.

    Open script

Installing the YAHAHA Lua debugger

You can install the YAHAHA Lua debugger in either of the following ways:

  • In your Visual Studio Code editor, search Yahaha on the Extension Marketplace. To get a preview, click Yahaha and then click Install to install the debugger.

    Install from VS Extension MKT

  • On Visual Studio Marketplace, find the debugger ond choose Install.

    Install from VS MKT

You will be prompted to open your code editor and directed to the preview page for the debugger on the Extension Marketplace. Then choose Install.

Configuring the YAHAHA Lua debugger

  1. Switch to Run and Debug and click create a launch.json file. Choose Yahaha Lua Debugger, then the JSON file automatically appears.


  2. Run the debugger to connect to YAHAHA Studio.


  3. Now you've successfully run the debugger and try to set a breakpoint in your script. YAHAHA Studio will connect to the debugger in Play Mode.


    View the result in Console.