Excluding C# code from compilation process


It may be the case when the original, fully-featured game relies on the APIs that are not available in Luna, but the availability of those APIs is not a hard requirement for a playable. For instance, the full version of the game might use Unity's AI system with C# scripts communicating to this system, and the playable version slice can be easily done without that behaviour.

That is the reason Luna UI features an ability to exclude certain folders and files from compilation process as initiated by the developer.

How to configure code excludes

Luna UI has a separate tab named "Source code" dedicated mainly to this particular purpose:


Excluding a set of files or an individual file from compilation by Luna is as easy as ticking a checkbox next to a folder or a C# file. This action doesn't alter the Unity project in any way and simply removes the corresponding files from Luna solution.

It is a very effective way of quickly reducing the number of build errors if the app relies heavily on third-party libraries (Social SDKs, Ad SDKs and so on).

Make sure to exclude files carefully. Removing scripts that are used in the scene or added to the objects dynamically will not lead to compilation errors but would potentially crash the app in runtime!