DynamicExpresso
DynamicExpresso copied to clipboard
No ahead of time (AOT) code was generated. ( IL2CPP scripting backend)
Hi guys. Cant run an example on the Android platform after update 2.9.8 (Unity 2020.3.25f1 (64-bit))
ExecutionEngineException: Attempting to call method 'System.Linq.Expressions.Interpreter.LightLambda::MakeRun1<System.Int32,System.Boolean>' for which no ahead of time (AOT) code was generated.
Do you get this error just for a particular expression? Or for all? Can you provide some way to reproduce the problem locally?
Hi @davideicardi, an error was acquired for all examples. Is there any way, settings I need to change for the Android build?
@Vah94 Sorry, I'm not expert at all on Android platform. I assume that you use it inside Unity. Correct? Which version?
Can you provide us a way to reproduce the problem in a linux or win machine? Otherwise for us can be difficult to fix the issue.
@Vah94 you said it stopped working after the migration to 2.9.8, did it work with a previous version of DynamicExpresso? If you could find the last version where it worked, it would help us find what could cause the issue.
The problem can be reproduced by building with an IL2CPP scripting backend.
Hi @metoule, previous version is 2.9.3
Hi @Vah94, happy new year! Just to confirm, it worked with 2.9.3, but failed with 2.9.4?
TestProject(2D).zip Hi @metoule :D Could you check the attached project?
Not sure if people are still interested in this topic. I just ran into the same problem. And I found the reason why it happened but could not find any solution. Tried linker.xml as recommended by documentation, it did not work (might be me doing it wrong).
Here is why: When building with IL2CPP in Unity, some code will be automatically stripped if the engine does not find any usage of the code in your project. If you change to Mono which does not strip any code, it should probably work as fine.
I can try to help, but as you can immagine it can be difficult to understand for us.
Here are the changes between 2.9.3 and 2.9.4: https://github.com/dynamicexpresso/DynamicExpresso/compare/v2.9.3...v2.9.4
@Vah94 Can you confirm that these are the versions affected?