Skip to content

Commit

Permalink
docs(unity): update runtime example for new callback
Browse files Browse the repository at this point in the history
  • Loading branch information
mwfarb committed Jun 20, 2024
1 parent 0e99a35 commit 7044627
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions content/unity/runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,15 @@ public class ArenaTestButton : MonoBehaviour
scene.OnMessageCallback = MessageCallback;

// Manually ingest a message, not received from MQTT subscriber
scene.ProcessMessage(payload);
scene.ProcessMessage("realm/s/public/example/scene-options", payload);
}

/// <summary>
/// A delegate method used as a callback to go some special handling on incoming messages.
/// </summary>
public static void MessageCallback(string message)
public static void MessageCallback(string topic, string message)
{
Debug.LogFormat("Message received: {0}", message);
Debug.LogFormat("Message received on topic {0}: {1}", topic, message);
}

/// <summary>
Expand Down

0 comments on commit 7044627

Please sign in to comment.