doghappy / socket.io-client-csharp

socket.io-client implemention for .NET
MIT License
733 stars 126 forks source link

When use unity not working #346

Closed devprog-dev closed 9 months ago

devprog-dev commented 9 months ago

E/Unity: PlatformNotSupportedException: Operation is not supported on this platform.

Maybe text json not working at System.Text.Json.Serialization.JsonConverter`1[T].WriteCore (System.Text.Json.Utf8JsonWriter writer, T& value, System.Text.Json.JsonSerializerOptions options, System.Text.Json.WriteStack& state) [0x00000] in <00000000000000000000000000000000>:0

doghappy commented 9 months ago

I'm not sure why you got PlatformNotSupportedException, have you tried to use SocketIO.Serializer.NewtonsoftJson instead?

devprog-dev commented 9 months ago

I solved, I change newtonsoft.json for unity. Thank you.