<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[TriggerAllFillChanges InvalidCastException]]></title><description><![CDATA[<p>Hi,</p>
<p>I have a class with my Client and Room variables in Unity.<br />
I was using just one Scene in Unity, and the game was working fine.<br />
When the game starts, I am using ColyseusManager.room.State.TriggerAll(); to receive the changes from the server.</p>
<p>But then I decided to make two scenes for better organization of my game:</p>
<ul>
<li>The Scene 1 have a button to the game leader send a command to the server to start the game.</li>
<li>The Scene 2 is the game itself.<br />
Both of these scenes use the static variables (room and client) from my singleton class.</li>
</ul>
<p>The problem is that, after starting another scene, the method TriggerAll() throws this exception:<br />
<img src="/assets/uploads/files/1610414513678-colyseus_er-resized.png" alt="0_1610414513285_colyseus_er.png" class="img-responsive img-markdown" /></p>
<p>Thanks for any help!</p>
]]></description><link>http://discuss.colyseus.io/topic/435/triggerallfillchanges-invalidcastexception</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Jul 2026 10:56:06 GMT</lastBuildDate><atom:link href="http://discuss.colyseus.io/topic/435.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 12 Jan 2021 01:20:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to TriggerAllFillChanges InvalidCastException on Tue, 12 Jan 2021 01:22:02 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>I have a class with my Client and Room variables in Unity.<br />
I was using just one Scene in Unity, and the game was working fine.<br />
When the game starts, I am using ColyseusManager.room.State.TriggerAll(); to receive the changes from the server.</p>
<p>But then I decided to make two scenes for better organization of my game:</p>
<ul>
<li>The Scene 1 have a button to the game leader send a command to the server to start the game.</li>
<li>The Scene 2 is the game itself.<br />
Both of these scenes use the static variables (room and client) from my singleton class.</li>
</ul>
<p>The problem is that, after starting another scene, the method TriggerAll() throws this exception:<br />
<img src="/assets/uploads/files/1610414513678-colyseus_er-resized.png" alt="0_1610414513285_colyseus_er.png" class="img-responsive img-markdown" /></p>
<p>Thanks for any help!</p>
]]></description><link>http://discuss.colyseus.io/post/1413</link><guid isPermaLink="true">http://discuss.colyseus.io/post/1413</guid><dc:creator><![CDATA[arturspon]]></dc:creator><pubDate>Tue, 12 Jan 2021 01:22:02 GMT</pubDate></item><item><title><![CDATA[Reply to TriggerAllFillChanges InvalidCastException on Invalid Date]]></title><description><![CDATA[<p>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.</p>
<p>Does anyone have any ideas?</p>
]]></description><link>http://discuss.colyseus.io/post/1415</link><guid isPermaLink="true">http://discuss.colyseus.io/post/1415</guid><dc:creator><![CDATA[arturspon]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to TriggerAllFillChanges InvalidCastException on Tue, 12 Jan 2021 23:19:03 GMT]]></title><description><![CDATA[<p>Can't make it work... Well, for now I will be using a server side &quot;hack&quot; to trigger the state change at the start of a match.<br />
Oh, and I also add this to the Schema.cs file to the error go away:<br />
<img src="/assets/uploads/files/1610493540530-tostringcast-resized.png" alt="0_1610493539520_tostringcast.png" class="img-responsive img-markdown" /></p>
]]></description><link>http://discuss.colyseus.io/post/1416</link><guid isPermaLink="true">http://discuss.colyseus.io/post/1416</guid><dc:creator><![CDATA[arturspon]]></dc:creator><pubDate>Tue, 12 Jan 2021 23:19:03 GMT</pubDate></item></channel></rss>