This solves the issue. Thank you!
0
Reputation
2
Posts
965
Profile views
0
Followers
0
Following
Posts made by VanillaDevelop
RE: Local schema mismatch using Unity client
posted in Questions & Help •
Local schema mismatch using Unity client
posted in Questions & Help •
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!