TriggerAllFillChanges InvalidCastException


I have a class with my Client and Room variables in Unity.
I was using just one Scene in Unity, and the game was working fine.
When the game starts, I am using; to receive the changes from the server.

But then I decided to make two scenes for better organization of my game:

  • The Scene 1 have a button to the game leader send a command to the server to start the game.
  • The Scene 2 is the game itself.
    Both of these scenes use the static variables (room and client) from my singleton class.

The problem is that, after starting another scene, the method TriggerAll() throws this exception:

Thanks for any help!

I am still investigating the issue. It seems that I cannot change scenes after connected to a room, if I change the TriggerAll() throws the error.

Does anyone have any ideas?

Can't make it work... Well, for now I will be using a server side "hack" to trigger the state change at the start of a match.
Oh, and I also add this to the Schema.cs file to the error go away: