Navigation

  • Recent
  • Tags
  • Users
  • Search
  • Login
Colyseus
  • Login
  • Search
  • Recent
  • Tags
  • Users

Documentation GitHub

We're migrating to GitHub Discussions. This forum does not accept new registrations since April 6, 2023.
  1. Home
  2. wdemo
  3. Best
  • Profile
  • More
    • Continue chat with wdemo
    • Flag Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

Best posts made by wdemo

Can't run example from Colyseus Unity SDK, got JsonSerializationException (solved)

Hi, there's an issue, need guys to help!

platform: WebGL
There has no exception when running in Unity Editor, but has an exception in the browser.

When the client joins the room, the exception shows up:

JsonSerializationException: Unable to deserialize instance of 'Colyseus.Schema.MapSchema`1[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]' because there is no parameterless constructor is defined on type.
  at GameDevWare.Serialization.Metadata.TypeDescription.CreateInstance () [0x00000] in <00000000000000000000000000000000>:0 
Rethrow as SerializationException: Failed to read value for member 'attributes' of 'ExampleNetworkedUser' type.
More detailed information in inner exception.
  at GameDevWare.Serialization.Serializers.ObjectSerializer.DeserializeMembers (GameDevWare.Serialization.IJsonReader reader, GameDevWare.Serialization.IndexedDictionary`2[KeyT,ValueT] container, GameDevWare.Serialization.Serializers.ObjectSerializer& serializerOverride) [0x00000] in <00000000000000000000000000000000>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <00000000000000000000000000000000>:0
posted in Questions & Help • 13 Jul 2022, 20:10

© 2023 Endel Dreyer