<?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[[UNITY] I using broadcast(bc) but server only bc to 1 client itselft]]></title><description><![CDATA[<p>SERVER CODE<br />
onCreate (options: any) {</p>
<pre><code>    this.setState(new State());

    this.setMetadata({
        str: &quot;hello&quot;,
        number: 10
    });

    this.setPatchRate(1000 / 20);
    this.setSimulationInterval((dt) =&gt; this.update(dt));

    this.onMessage(&quot;cl_move_right&quot;, (client) =&gt; {
        const p = this.state.players[client.sessionId];
        this.broadcast(&quot;sv_move_right&quot;, p );
    })
}
</code></pre>
<p>// CLIENT (UNITY)<br />
room.OnMessage&lt;Player&gt;(&quot;sv_move_right&quot;, (plaayer) =&gt;<br />
{<br />
Debug.Log(player);<br />
inputText.text += &quot;__&quot; + player.sessionId;<br />
});</p>
]]></description><link>http://discuss.colyseus.io/topic/408/unity-i-using-broadcast-bc-but-server-only-bc-to-1-client-itselft</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Apr 2026 17:40:40 GMT</lastBuildDate><atom:link href="http://discuss.colyseus.io/topic/408.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 15 Oct 2020 03:44:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [UNITY] I using broadcast(bc) but server only bc to 1 client itselft on Invalid Date]]></title><description><![CDATA[<p>SERVER CODE<br />
onCreate (options: any) {</p>
<pre><code>    this.setState(new State());

    this.setMetadata({
        str: &quot;hello&quot;,
        number: 10
    });

    this.setPatchRate(1000 / 20);
    this.setSimulationInterval((dt) =&gt; this.update(dt));

    this.onMessage(&quot;cl_move_right&quot;, (client) =&gt; {
        const p = this.state.players[client.sessionId];
        this.broadcast(&quot;sv_move_right&quot;, p );
    })
}
</code></pre>
<p>// CLIENT (UNITY)<br />
room.OnMessage&lt;Player&gt;(&quot;sv_move_right&quot;, (plaayer) =&gt;<br />
{<br />
Debug.Log(player);<br />
inputText.text += &quot;__&quot; + player.sessionId;<br />
});</p>
]]></description><link>http://discuss.colyseus.io/post/1343</link><guid isPermaLink="true">http://discuss.colyseus.io/post/1343</guid><dc:creator><![CDATA[lqvinh2]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to [UNITY] I using broadcast(bc) but server only bc to 1 client itselft on Invalid Date]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="http://discuss.colyseus.io/uid/728">@lqvinh2</a> said in <a href="/post/1343">[UNITY] I using broadcast(bc) but server only bc to 1 client itselft</a>:</p>
<blockquote>
<p>SERVER CODE<br />
onCreate (options: any) {</p>
<pre><code>    this.setState(new State());

    this.setMetadata({
        str: &quot;hello&quot;,
        number: 10
    });

    this.setPatchRate(1000 / 20);
    this.setSimulationInterval((dt) =&gt; this.update(dt));

    this.onMessage(&quot;cl_move_right&quot;, (client) =&gt; {
        const p = this.state.players[client.sessionId];
        this.broadcast(&quot;sv_move_right&quot;, p );
    })
}
</code></pre>
<p>// CLIENT (UNITY)<br />
void RegisterRecMess()<br />
{<br />
room.OnMessage&lt;Player&gt;(&quot;sv_move_right&quot;, (plaayer) =&gt;<br />
{<br />
Debug.Log(player);<br />
inputText.text += &quot;__&quot; + player.sessionId;<br />
});<br />
}</p>
</blockquote>
<pre><code>async void OnMoveRight()
{
    await room.Send(&quot;cl_move_right&quot;);
}</code></pre>
]]></description><link>http://discuss.colyseus.io/post/1344</link><guid isPermaLink="true">http://discuss.colyseus.io/post/1344</guid><dc:creator><![CDATA[lqvinh2]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>