GitHub Documentation Patreon donate button

Issue on unity 2020 and colyseus 0.13



  • On running the game the following error throw on the console of unity Editor
    IndexOutOfRangeException: Index was outside the bounds of the array.
    Colyseus.Schema.Schema.CreateTypeInstance (System.Byte[] bytes, Colyseus.Schema.Iterator it, System.Type type) (at Assets/Plugins/Colyseus/Serializer/Schema/Schema.cs:753)
    Colyseus.Schema.Schema.Decode (System.Byte[] bytes, Colyseus.Schema.Iterator it) (at Assets/Plugins/Colyseus/Serializer/Schema/Schema.cs:658)
    Colyseus.SchemaSerializer1[T].Patch (System.Byte[] data, System.Int32 offset) (at Assets/Plugins/Colyseus/Serializer/SchemaSerializer.cs:30) Colyseus.Room1[T].Patch (System.Byte[] delta, System.Int32 offset) (at Assets/Plugins/Colyseus/Room.cs:326)
    Colyseus.Room`1+<ParseMessage>d__37[T].MoveNext () (at Assets/Plugins/Colyseus/Room.cs:285)
    --- End of stack trace from previous location where exception was thrown ---
    System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <fb001e01371b4adca20013e0ac763896>:0)
    System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) (at <fb001e01371b4adca20013e0ac763896>:0)
    UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at <a9810827dce3444a8e5c4e9f3f5e0828>:0)
    UnityEngine.UnitySynchronizationContext:ExecuteTasks()



  • Solution: Changed to 0.14 , now testing.


 

© 2020 Endel Dreyer