Skip to main content

Preparing Your Code - Overview

In order to convert the source code of a Unity project, Unity Playworks Plugin uses C# to JavaScript transpiling. The output of this process is then run on the Unity Playworks Plugin game engine in the final build.

It may be the case the initial export doesn't work due to compilation errors or that it produces undesirably large output. This section's goal is to provide insights on how to work around most common issues in a quick an easy way without disrupting general Unity workflow.

Unity Playworks Plugin supplied a number of tools and features that help you navigate your code and ensure it can be compiled with Luna, in the Code and Develop section of the Plugin UI.

plugin-ui-code

Getting started

First of all, it is helpful to go over the below checklist and make sure Unity Playworks Plugin is properly set up for the project:

Compilation issues

When the project export process is started but the code compilation fails, the following topics describe how to address common issues: