Text Chat
Text chat between the web and in event experience
Last updated
Text chat between the web and in event experience
Last updated
Due for Simplification, please see Docs.
31/10/2024: Long term goal is for MSquared to provide an example of text Chat that does not use PubNub or Community Sift. If customers wish to continue using these services, they need to speak to the Solutions Engineering team for guidance on how to implement this within their project outside of what MSquared provides off the shelf.
When MSquared drops support for PubNub, we will no longer support Web-to-Unreal text chat. Chat will be limited to Unreal Worlds within MSquared.
Work is being done to decouple our chat widget from the Legacy UI elements we are deprecating. Following this the plan is to replace the functionality under the hood to us Unreal for text chat.
Until MSquared completely drops support of PubNub and Community sift they will remain functional. When the new simplified chat lands, the old chat widget will remain within the platform for customer use.
MSquared will not be addressing non-critical and cosmetic issues relating to Text Chat during this process of simplification. Please reach out to your Support Engineers with concerns.
Beta Quality - Customers are encouraged to test and use Beta features in their experiences, but may still require some support
The ability to chat on web and in game, including:
Chat from Web to Unreal and back
Works on Desktop and Mobile*
Text appears in game above the head
Ability to hide and show the widget, and custom sizing
User name and profile image appending to the message
The in-and-out-experience chat is backed by PubNub. For battle-tested, in-experience only chat, see Experience Only Chat.
* Mobile is currently only supported via the old chat UI (Cloud Chat). See Adding Mobile support to continue use of this version of the text chat for desktop
Make sure you have a safe internal launch context id set up for your editor users.
Configure the variable Social.Chat.Editor.LaunchContextId
in deployment.json
with this value (see below)
Enable TextChat.UseCloudChat
in game.json
.
Make sure your in-game HUD is set up to use the new chat system
The following settings in game.json
influence the Text Chat feature:
Create a deployment.override.json
in your project live config directory (Config/LiveConfig/Overrides) and add the following, replacing the LaunchContextId
with a launch context in your project. This should ideally be a persistent launch context so it will always be available
This uses a Launch Context id, not a World Id. This will likely be updated in the near future.
The following deployment.json
influence the Text Chat feature:
Add WBP_M2_TextChat
to your HUD and ensure it is stretched across the whole screen.
WBP_M2_TextChat
does not yet support mobile platforms. If your HUD is or derives from WBP_TH_HUD
then your good to go. Otherwise follow the below steps:
Use a widget switcher to switch between WBP_M2_TextChat
and WBP_TextChatWindow_Mobile
with the following code to allow it to automatically revert to the old UI for mobile devices.
On Bootflow finished, add a handle to get live config updates.
Create a function called Update Live Config and add the following:
Settings marked (LEGACY) may be removed in a future update
Setting | Description | Default Value |
---|---|---|
Setting
Description
Default Value
TextChat.UseCloudChat
Enables the cloud chat functionality
true
TextChat.ForceMobileView
Forces mobile view regardless of detected platform
false
Setting
Description
Default Value
Social.Chat.LaunchContextSource
Determines how the client should determine the launch context id to use for chat.
The values are as follows:
“LiveConfigWorldId” (use the legacy M2.Domains.WorldId value) - this is how the previous system worked
“LiveConfigChatLaunchContext” - a setting provided from live config (Social.Chat.LaunchContextId)
“CommandLineLaunchContext” - use the -LaunchContextId command line argument the game was booted from (default behaviour if not set)
CommandLineLaunchContext (the game uses the commandline argument -LaunchContextId)
Social.Chat.LaunchContextId
Use this launch context id for chat.
Only when Social.Chat.LaunchContextSource is set to LiveConfigChatLaunchContext)
Social.Chat.Editor.LaunchContextSource
Similar to Social.Chat.LaunchContextSource, but determine how the editor should find its chat launch context.
LiveConfigChatLaunchContext
Social.Chat.Editor.LaunchContextId
Set this to a “known good” (safe/internal) launch context that should be used for chat in your project.
This is required for editor users to use chat.
You can create one in the M2 Web Platform Admin UI
M2.Domains.WorldId
(LEGACY)
The launch context id in the web to scope the chat to.
This must match the web portals if you want cross-experience chat.
TextChat.GlobalChatEnabled
Enables the Global Chat channel
true
TextChat.UseCloudChat
Enables use of the cloud based chat system, linking the in game chat with web chat
true
TextChat.ForceMobileView
Forces the old Chat UI (WBP_TextChatWindow_Mobile
) to a full screen mobile view, regardless of platform or device used
false
TextChat.ForceMobileUI
Force the old Chat UI (WBP_TextChatWindow_Mobile
) to be used over the new WBP_M2_TextChat
regardless of platform or device used
false
TextChat.StartMinimized
Sets the chat interfaces to start in a minimized state
true
TextChat.EmojiMenuEnabled
Enables the in game emoji menu to be used. Only supported in WBP_M2_TextChat
true
TextChat.ReactionsEnabled
Enables message reactions. Still WIP, not yet supported in Origin
false
TextChat.MaxHistoryMessages
Max messages to be displayed in the chat interface
100
TextChat.LocalChatEnabled
(LEGACY)
Enables Local chat functionality for Experience only chat
true
TextChat.LocalRateLimitPerSecond
(LEGACY)
Maximum number of messages a player can send per second
10
TextChat.LocalRateLimitQueueSize
(LEGACY)
Defines the message queue size for the local chat server
100
TextChat.AllowQuestions
(LEGACY)
Allows questions to be sent in chat
false