-
-
Notifications
You must be signed in to change notification settings - Fork 754
Open
Labels
Description
I have an error like tihs:
Failed to serialize System.Collections.Generic.List`1[[Server.Shared.Message, Server.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] value.
From Unity and Server(.net8) both. I use [Union] for Polymorphism. My "Message" class from Shared Project like:
[Union(0, typeof(RegisterRequest))]
[Union(1, typeof(RegisterResponse))]
[Union(2, typeof(LoginRequest))]
[Union(3, typeof(LoginResponse))]
public abstract class Message { }
And all "Response" and "Request" inheriting from "Message" Class.
So when I try to serialize as List(), I always fail...
I want to send messages as list from an IL2CPP build. Also my server is AOT.