Hello.
I'm trying to use the Unity Client right now. My server has a "GameRoom" which has the following Schema for its state
export class GameState extends Schema
{
@type([ "int16" ])
pipes = new ArraySchema<number>();
}
I then use schema-codegen to generate the following C# class
public class GameState: Schema
{
[Colyseus.Schema.Type(0, "array", "int16")]
public ArraySchema<short> pipes = new ArraySchema<short>();
}
When trying to connect to the room using
client = new Client("ws://localhost:2567");
try
{
room = await client.JoinOrCreate<GameState>("game");
}
catch(Exception ex)
{
Debug.Log("Exception: " + ex.Message);
}
I get the error: Exception: Local schema mismatch from server. Use "schema-codegen" to generate up-to-date local definitions.
I'm not sure if I am doing something wrong or if this is a bug, but I am using schema-codegen to generate the schema class and I am still getting the error. What could be the source of this? Thank you!