Skip to content

Releases: colyseus/colyseus-unity-sdk

0.10.7

20 May 23:25
Compare
Choose a tag to compare
  • Decode "number" (varint) as float ("float32") by default.

0.10.6

20 May 20:48
Compare
Choose a tag to compare

Fixes decoding int64 / uint64

0.10.5

11 May 15:40
e03487f
Compare
Choose a tag to compare

Fixes ArraySchema and MapSchema of primitive types. (#71, #70)

To update, please:

  • Please remove your node_modules, package-json.lock
  • npm install to get the latest version of @colyseus/schema
  • re-generate your C# schema definitions using npx schema-codegen tool.

0.10.4

01 May 00:54
06998fe
Compare
Choose a tag to compare

(#69, thanks @etherny for reporting)

  • Uses Dictionary<int, T> internally instead of List for ArraySchema
  • Implement ForEach method on ArraySchema and MapSchema

0.10.3

23 Apr 00:10
Compare
Choose a tag to compare

Schema Serializer

Supports polymorphism on references, arrays, and maps. Example:

class State extends Schema {
    @type([ Entity ]) entities = new ArraySchema<Entity>();
}

class Entity extends Schema {
    @type("number") x: number;
    @type("number") y: number;
}

class Enemy extends Entity {
    @type("string") name: string;
}

// ... room handler
this.state.entities.push(new Enemy());

Breaking change

You need to re-run npx schema-codegen with the latest version of @colyseus/schema to have a working schema definition in the client-side.

0.10.2

31 Mar 22:46
Compare
Choose a tag to compare

Compatible with room proxying available on [email protected]

0.10.1

27 Mar 03:30
Compare
Choose a tag to compare

The schema serializer is now available for C#/Unity3D! 🎉

0.10.0

24 Mar 02:28
Compare
Choose a tag to compare

Compatibility with Colyseus 0.10.

(New serializer not available for this platform yet)

0.9.9

04 Mar 22:39
Compare
Choose a tag to compare
  • room.Leave() now has a consented argument, which is true by default.
  • room.Leave(true) - results in a consented=true leave in the server-side.
  • room.Leave(false) - results in a consented=false leave in the server-side.

You can use the consented value in the server-side for allowReconnection().

0.9.8

09 Feb 17:58
Compare
Choose a tag to compare

Add immediate option as third argument on Listen() method, as the other clients already have.

room.Listen("something", this.YourCallback, true)

This feature is useful for getting the initial state from the server. By using the third parameter as true, the callback specified will be called for the initial state as well as incoming changes.