Some Errors on iL2CPP build

FlowCanvas Forums Support Some Errors on iL2CPP build

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2867
    spayke
    Participant

    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

    Edit v2:

    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”

    Unity: 2019.4.19 | FlowCanvas: 3.1.8

    Attachments:
    You must be logged in to view attached files.
    #2870
    spayke
    Participant

    tried same scene with bolt, build have no errors,
    but i’d like to use FC, i feel like i missing something, maybe some Types(tried to add bunch of random types, didn’t work)

    any feedback on how fixable this errors?

    #2872
    Gavalakis
    Keymaster

    Hello there,

    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.

    Please let me know if that works for you 🙂

    Join us on Discord: https://discord.gg/97q2Rjh

    #2873
    spayke
    Participant

    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!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.