Releases: colyseus/colyseus-unity-sdk
Releases · colyseus/colyseus-unity-sdk
0.10.4
0.10.3
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
Compatible with room proxying available on [email protected]
0.10.1
The schema serializer is now available for C#/Unity3D! 🎉
0.10.0
0.9.9
room.Leave()
now has aconsented
argument, which istrue
by default.room.Leave(true)
- results in aconsented=true
leave in the server-side.room.Leave(false)
- results in aconsented=false
leave in the server-side.
You can use the consented
value in the server-side for allowReconnection()
.
0.9.8
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.