-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Formatters error in IL2CPP build #68
Comments
Hi, Let's go through everything step by step: 1.) Aot CodeThe message
To actually tell the IL2CPP compiler that you are going to use a generic instantiation of a class you just have to use it somewhere.
And you are (indirectly!) using it by having a field like this: public List<ulong> positions;
To directly use it, you can write a "mock usage" anywhere in your code where the analyzer will be able to find it: var unused = new CerasSerializer();
new CollectionFormatter<List<ulong>, ulong>(unused); // for: "public List<ulong> positions;"
new CollectionFormatter<List<uint>, uint>(unused); // for: "public List<uint> rotations;" What you could do is simply calling that code once from a As far as I know Unity requires you to write out an example use like that for every combination of (generic type) + (value type). If you are using reference-types, you don't have to specify anything multiple times. Example where you must write out both: As for reference types, you don't need to list all the different ones: 2.) Crash in ApplyToConfigYou mentioned here that you're getting another crash: 3.) Formatter generator hangsCan you tell me more about that part? Do you have a call-stack of that? Where does it hang? |
thanks for the help! when i add the lines you suggested, creating a dummy serializer and CollectionFormatters, I get a nullref when deserializing in the Unity editor:
|
Getting a crash in a build (Editor works fine) when setting up serializer using Unity IL2CPP and pre-generated formatter:
my serializer config:
My data class:
using generic List<> because auto-generator hangs on normal Array[]
Let me know if i can provide any more info.
Platform
Unity IL2CPP (UWP app). Unity 2019.2.7f
The text was updated successfully, but these errors were encountered: