Skip to content

Commit f6b51f4

Browse files
authored
restore namespace to device topic (#21)
1 parent 6a140cc commit f6b51f4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Runtime/Scripts/Signaling/ARENAMQTTSignaling.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ public class ARENAMQTTSignaling : ISignaling
1414
private ArenaTopics subRenderServerTopic;
1515

1616
private string[] m_subbedTopics;
17+
private int msgTypeRenderIdx = (int)ArenaTopicTokens.SCENE_MSGTYPE;
18+
private string msgTypeRender = ArenaTopicSceneMsgTypes.RENDER;
1719

1820
private SynchronizationContext m_mainThreadContext;
1921

@@ -73,6 +75,7 @@ private void Publish(string toUid, string msg)
7375
realm: scene.realm,
7476
name_space: scene.namespaceName,
7577
scenename: scene.sceneName,
78+
userclient: scene.userclient,
7679
idtag: "-",
7780
touid: toUid
7881
);
@@ -168,7 +171,7 @@ protected void ProcessMessage(string topic, string content)
168171
{
169172
// filter messages based on expected payload format, only read "r" messages
170173
var topicSplit = topic.Split("/");
171-
if (topicSplit.Length <= 4 || topicSplit[4] != "r") return;
174+
if (topicSplit.Length <= msgTypeRenderIdx || topicSplit[msgTypeRenderIdx] != msgTypeRender) return;
172175

173176
try
174177
{

0 commit comments

Comments
 (0)