The Diagnostics panel provides a breakdown of any compilation issues with your playable. To access it, you can navigate to the Code section, and select the Diagnostics tab.
Currently, the panel simply analyses the project solution and presents/groups any compilation errors without needing to compile the project completely. Over time, we will be improving Diagnostics to provide more context/helpful insights regarding compilation.
When to use it
Diagnostics is a useful way to view the compilation status without having to compile your project or switch over to your IDE.
Often you may want to simply exclude any code that won't be needed in your playable, simply open the Diagnostics (and hit 'Refresh') to see how these changes impact the compilation. The same is true for the other code related Luna features;
With the 'Compile' button you can trigger a code compilation, this will recompile your code without executing a full build (exporting assets). This is useful when iterating on code changes since it will be faster than a 'Develop' build but means only code changes will be updated in the output.
Opening the Luna Solution
To open the file a diagnostic's error is pointing to, simply double-click on the error message shown in the window. This will open the script at the line where the error is stemming from:
The scripts will use Luna's version of the Unity Engine, while also linking changes made here to their original Unity counterparts.
Alternatively you can use the "Open Luna Solution" button at the bottom of the same window to open the solution file, regardless of whether there are any errors occurring.
How it works
Diagnostic logs are grouped either by the CS error code, or by the file in which they occur, you can change this with the 'Group By' option.
Any errors you see in this panel regarding the
UnityEngine namespace, actually refer to our version
UnityEngine and therefore highlight compatibility issues between your project and Luna.
How to analyse your project
Load the project you wish to build with Luna Playable in Unity.
Ensure you have Luna Playable installed and included in the project. To learn more about setting up Luna Playable visit our Getting Started guide.
Open the Luna Playable window and navigate to the Code section, and the Diagnostics tab.
Issues with your project identified by the plugin will now appear in the window. The top table will contain issues grouped depending on the 'Group By' option, selecting an entry here will populate the table below with the logs for that particular group.
Selecting a log will display more specific information at the bottom of the panel, including the full error message and a code snippet of the issue.
You can open the Luna Solution file to debug and fix errors in an IDE.