Cannot Reproduce

Aot prebuilt should ignore code inside UNITY_EDITOR only define.

poshih 3 years ago updated by Lazlo Bonin (Lead Developer) 3 years ago 4

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:
Scripting Backend:
.NET Version (API Compatibility Level):
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.

hi sorry for late followup, it was trying to generate AOT from function that I don't use in graphs, I don't remember what those function looks like, it might be because it's a static function, I don't know why they were picked as candidate for AOT. 

I will get back here if I can reproduce it.

Thanks, I'll close this for now, feel free to comment again when you have repro steps!