FlowCanvas Forums › Support › Generate AOT Errors
Hi,
I’m making a game using FlowCnavas (for Android and iOS). I’ve build it multiple times in the past and everything worked fine. But this time, when generating the AOT-files, I recieved quite a lot of errors and I have no idea what causes them or what I have to do to fix them. It occurs when i press the button to generate those files (I’ve deleted the previously generated files). After a few seconds of generating, the console gets spammed with 999+ errors saying: “Assets/Project/AOT/AOTClasses.cs(103,9): error CS0102: The type ParadoxNotion.Internal.AOTDummy' already contains a definition for
FlowCanvas_BinderConnection_Maia_Api_Campaign_MicroContent_Meta'” and this for multiple types of files. (screenshot linked below).
Any ideas how to fix these errors?
Thanks in advance.
Hello,
Hmm. There could be a bug in the generator. Can you please send me the AOTClasses.cs file generated to see what is generated a bit better?
That would help identify the problem.
If so, please do send to (support_AT_paradoxnotion.com).
Thanks!
Join us on Discord: https://discord.gg/97q2Rjh
Thanks for your response!
I have been working on the project since my first post so I can’t show you the exact files from then, since they have been regenerated a few times. However, I can regenerate the files now and send them to the mail address you told me in your last post. I found out that i can solve the errors by first saving the “preferred types” as a preset, then clearing the editorprefs and then loading the preset again. then deleting the two generated files (old files) and regenerating them. But i’m guessing this isn’t supposed to be the correct workflow haha
Secondly,
I have can’t play the projetc on iOS, because it gives me errors about a missing type. In the beginning of the project i added the whole System-namespace. a few of the errors in the first post were caused by this mistake. but in the process of deleting the types of “System” i didn’t use, i accidentially deleted a type that i did use (apparently), because the error says that no AOT code was created for the type he wants to access. Now, is there an easy way to check which types are used in my graphs, so i can add them to the “preferred types” window?
Thanks in advance!
Hello!
I just want to let you know that I’ve replied to your email.
Can you please confirm you received my email with the fix and whether or not that is working for you?
There is currently no easy way to check which types are in use within the graphs, but that is something that I should add.
Having said, please note that only “Struct” types need to be added in the Preferred Types editor as far as generating AOTClasses.cs file goes for AOT platforms, so they usually aren’t really that many (hopefully). If you still have problems with this, I could create a quick solution to scan graph for types and add them to the Preferred Types List. Let me know if so (either here, or in email).
Thank you! 🙂
Join us on Discord: https://discord.gg/97q2Rjh
Hi,
I did indeed recieved your email and I adjusted the code like you suggested. This does solve the problem that causes all those errors I was talking about in my first post. Maybe it’s a good idea to put those lines of code in a future update, just to make sure no one else gets this error 🙂
The problem with the types I had, started when I deleted some types because I accidentially added too many. So a lot of people probably won’t stumble upon this problem but still. To illustrate the project I’m working on: I made a core and a design project. The user downloads the core in the AppStore or PlayStore and when he logs in, the app downloads the assetbundles it needs for that user (from the designproject). So I made classes and other structures in the core. In order to acces those methods I need to add them to the Preferred Types, right? but these are classes and methods, not “structs”. So i should add classed and not just “Struct” types, or am I doing something wrong? Nevertheless, it would indeed be easier of you could create a quick scan solution, if you don’t mind. That would be much appreciated!
Many thanks!
Hello again,
I have indeed put those fix lines in the next version (currently pending review) just in case 🙂 Thank you!
I have attacehd for you here a very quick solution to scan the currently open graph (in the editor) for it’s existing connection types and reflected nodes in use (both classes and structs) and append those types in the Prefered Types list. To use this,
– Open up the graph you want to scan in the Graph Editor.
– Run the command from the Unity top menu “Tools/ParadoxNotion/Scan Current Graph And Append Pref Types”.
– The types that are added, will also be loged in the console.
Please let me know if that works for you.
Thanks!
Join us on Discord: https://discord.gg/97q2Rjh