- edited description
It'd be nice if AOT Generation generated serializers for classes and structs that are fields of types specified in the Support Serialized Types list.
1. What happened?
I am using AOT Generation and have vanilla C# data classes and structs. Many of these contain fields that are also vanilla C# data classes and structs. It’d be nice if I could just specify the main data classes and structs, and the AOT Generation could detect the other classes and structs that they depend on, and also generate serializers for them. Right now, it seems I need to specify each and every one which is annoying because I have a lot of data classes in my project and always add more.
2. How can we reproduce it?
Make a build with the SampleScene with AOT Generation, but only include TestData in the list. It will not work and required InnerData to be added too. Ideally, it’d work with just TestData and detect that InnerData also requires a serializer.
3. If screenshots would help explain or demonstrate your issue, please include these.
The test project contains 2 scripts:
The build only works if both of these types are added to the list:
Ideally, it’d work if just TestData was added to the list.
4. What version of Unity are you using?
2020.3.26
5. What version of Odin are you using? (See "Tools > Odin Inspector > About")
3.0.12.0
6. Do you have Editor Only mode enabled?
No
7. What operating system are you on?
Windows 11
When attaching ZIP files then please remember to remove Odin from the archive.
Comments (4)
-
reporter -
-
assigned issue to
- changed version to 3.1.0.0
- marked as major
-
assigned issue to
-
This is something that’s been on the backburner for a while, but it is indeed a very good idea. I’ll mark it for 3.1 as a reminder to get it done for that patch later this year :)
-
reporter Ok great, thanks!
- Log in to comment