Hi, when android game built in “Mono”, works great without any errors, but in iL2CPP, i get errors
i tried resolve this errors for couple of days, i just can’t resolve it, can you please look logs(attached), maybe i’m missing something(i’m beginner)
before building game, i added “Touch/TouchPhase” types, and generated AOT(without this step, touch won’t work for some reason)
Unity Version 2020.2.2f1, FlowCanvas/NodeCanvas 3.1.8
Hello again, i’ve made simple test scene, with only UI canvas, with button “Pause”(it’s onClick() > FlowScriptController.CallFunction(String) ), and when you click that button, it shows popup menu with “Reload Scene” button, so this simple scene gives me this errors(attached log_v2.zip), can someone please look this logs, and point me what i am doing wrong?
i generated “AOTClasses.cs” with default types before “Build and Run”
When building for AOT platforms (like IL2CPP), you need to add all the types that you are using within the flowscript into the Preferred Types Editor and then generate the files (as you’ve already done). In your case, you need to add the type named “UnityEngine.SceneManagement.Scene” because it is a type that is used within your flowscript.
This information can be obtained by looking at the log wherever it says “Attempting to call method [….] for which no ahead of time (AOT) code was generated.” and then check the bold part as showcased bellow:
Attempting to call method ‘FlowCanvas.ValueOutput`1[[UnityEngine.SceneManagement.Scene, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]::.ctor’ for which no ahead of time (AOT) code was generated.
The text in bold is the type that is missing from the Preferred Types and should be added before re-generatinng the AOT and XML files.
you know what’s funny? i saw that line and even searched to add that, but then i noticed by default it’s already has “SceneManager” type, and i was like wth i supposed to add, it’s already there you know lol.. Anyways i added “SceneUtility” type, and errors gone now, Thank you man!