Closed IlyaVorozhbit closed 3 years ago
Hi @IlyaVorozhbit, yes, ideally you should restart the server every time you make a change on it. On the latest create-colyseus-app
templates I've added the ts-node-dev
tool which does that automatically for you:
Install the ts-node-dev
package:
npm install --save-dev ts-node-dev
Use it as your start
script:
{
"scripts": {
"start": "ts-node-dev src/index.ts"
}
}
Hi!
I have added a few schema's to project, and when I tried to connect to server got an error, so I should use npx schema-codegen. I used it in another tab, and expected behaviour: it should work. But no, but when I terminated the server and start it again - problem disappear.
Its expected, that I need restart it? Can I open new PR, or I dont understand something?
Thanks
ps. line in code: https://github.com/colyseus/colyseus-unity3d/blob/30c9b7d8e8259a7516fafcbd26179a0ab6a91ec9/Assets/Plugins/Colyseus/Serializer/SchemaSerializer.cs#L58