Skip to content

Assemblers

Assemblers are a powerful tool for game developers, allowing them to quickly create gameplay objects without the hassle of scripting or attaching individual components. These sets of instructions come with pre-built gameplay logic, which improves workflow efficiency. In YAHAHA Studio, you can access default assemblers by going to Asset Box>Logic>Assembler. Furthermore, you can develop, customize, and delete your own assemblers.

Creating an assembler

Before creating assemblers, make sure Visual Studio Code is installed and integrated with your Studio. To create an assembler in Studio:

  1. Go to My Resource>Local files>Assemblers, then click + Create Now or + Create in the top left corner.
    create assembler

  2. In the Create and Assembler dialog, enter a name for your assembler and click Start editing. The name can only contain letters, numbers, and underscores, and cannot start with an underscore. The assembler is created immediately. start editing

  3. You will be directed to Visual Studio Code editor. Start to write the Lua script for your assembler and save it.

  4. In Studio run the assembler by clicking it. To find the assembler log, go to the Console.

Editing an assembler

To edit an existing assembler:

  1. Find the assembler by going to My Resource>Local files>Assemblers.

  2. Click More and choose Edit.

    start editing

  3. In the Assembler Config window, modify the name, hover tip, and description of the assembler. To edit your script for the assembler, click Edit to open your code editor. You can also attach dependencies to your assembler by clicking + Add dependency and choosing an asset type or ID to continue adding. Then click Save for all configuration changes to take effect.

    config assembler

Property Description
Name The identifier of the assembler. It can only contain letters, numbers, and underscores, and cannot start with an underscore. To change the assembler name, access the Assembler Config window and make the necessary edits rather than modifying the local file.
Brief The tooltip text for the assembler. It can contain helpful hints for users to quickly locate the assembler.
Description The brief description of the assembler that appears at the top of the assembler window after you click the assembler. It can contain basic information about the assembler regarding its function and use.
Code The Lua script for the assembler. To make changes to the script, click Edit to open your code editor and continue to modify the code.
Dependency Add necessary dependencies if you use any assets from Asset Library in your assembler. Supported dependency types include Model, Audio, Effect, Material, Animation, and Component. Failure to attach all required dependencies will result in errors when running the assembler.

Deleting an assembler

To delete an assembler:

  1. Find the assembler by going to My Resource>Local files>Assemblers.

  2. Click More and choose Delete.

    Delete assembler