Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent mutatibility of schema properties #140

Open
rthery opened this issue Apr 8, 2021 · 0 comments
Open

Prevent mutatibility of schema properties #140

rthery opened this issue Apr 8, 2021 · 0 comments

Comments

@rthery
Copy link

rthery commented Apr 8, 2021

Even after reading the official documentation, I wasn't 100% certain that Colyseus was only server authoritative (although I was 95% maybe ;))

What made me doubt is the fact that schema properties are actually public fields in the generated C# classes!
Since state cannot be mutated directly on the client side, we shouldn't allow this. Best to make these fields internal with a public getter, the intent will then be clear for any C# developer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant