Under Review

Aot prebuilt should ignore code inside UNITY_EDITOR only define.

poshih 1 week ago • updated by Lazlo Bonin (Lead Developer) yesterday at 9:46 a.m. 1

The stub aot prebuild made contain code that is inside Unity_editor only, this can cause standalone build to have compile error, would be nice if the stub ignore those code.

Bolt Version:
Unity Version:
.NET Version:
Under Review

Hi Poshih,

Thanks for the suggestion, I understand how that can be an issue. Unfortunately, there is no way to check at pre-build time whether code is inside a UNITY_EDITOR region; that is a pre-compilation step, and we use reflection on compiled assemblies to generate the stubs.

Can you give me an example of a class in which this happens? 

In theory, we (almost) only generate stubs for members that are used in your graphs, so if you use a UNITY_EDITOR only thing in your graphs, there's going to be an issue.