Server State Class How To Reference Room
mackycheese last edited by
My server does this in
I want the
Gameclass to be able to call
broadcaston the room.
If I do
onInit(), then this will be a part of the state and broadcast to the clients, which I don't want.
How can I pass a room reference to the room state without having it be a part of the serialized state?
I'm using the old serializer if it matters.
The reason I need to do this is because my state class handles all the game logic, and the room is basically a wrapper around the state.
First off, you shouldn't do this. It's meant to be a state, which holds data. Not a lot more than that.
That said, if you really want to, you can add a
@nosyncattribute to the room variable. to make it not serialized.