Skip to main content

Preparing Your Code - Overview

In order to convert the source code of a Unity project, Luna uses C# to JavaScript transpiling. The output of this process is then run on the Luna 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.

Luna 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 Luna UI.

luna-ui-code

Getting started

First of all, it is helpful to go over the below checklist and make sure Luna 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: