Chat
How to integrate a 3rd party chat system into your project
Introduction
This guide will help projects wanting to use a chat system that integrates with a 3rd party chat provider (as opposed to the default unreal chat system provided). There are a number of benefits for rolling an integrated chat solution in your Unreal project:
Scalability: 3rd party solutions can be better placed to handle the large volume of concurrent users and messages efficiently. This is particularly beneficial for projects developed on our platform, which expect thousands of users in one experience.
Improved Performance: 3rd party chat solution providers are often better optimised for real-time, low-latency communication across global networks.
Advanced Features: many third party solutions contain advanced features that would otherwise be difficult to implement/unavailable. These include features like:
Presence Detection
Built-in Moderation Capabilities
Message Persistence and History
Customizable Channels
For the purposes of this guide, we will be using Pubnub as our example (currently, our soon-to-be-deprecated chat systems hook into Pubnub). Pubnub's feature-rich free tier offers a variety of chat options that you may find useful for your project. They include:
Up to 1 million total messages per month
Data persistence of up to 1GB
Custom function modules for Moderation
Easy integration with Unreal via Pubnub APIs
Follow the steps below to get started with setting up your first Pubnub application!
Creating your Pubnub Application
Firstly, create an account with Pubnub. Once created, go to the "Apps" section, found under "Build", and create a new app:
Once created, set up a new Keyset within the application, with an appropriate name (see above).
You can configure your keyset, however you like; to get started, we recommend configuring as follows:
Presence:
ON
Defaults are usually fine
Announce Max:
20
Interval:
30
Stream Filtering:
ON
App Context:
ON
Region:
EU Central
(or US)User Metadata Events:
ON
Channel Metadata Events:
ON
Membership Events:
ON
Message Persistence:
ON
Retention: 7
days
Enable Delete-From-History:
ON
Stream Controller:
ON
Enable Wildcard Subscribe:
ON
(but could beOFF
?)
File Sharing:
OFF
Mobile Push Notifications:
OFF
Apple Push Notifications:
OFF
Firebase Cloud Messaging:
OFF
If you want to strictly enable authed users only chatting for your keyset:
EnableAccess Manager:
ON
Revoke v3 Token:
ON
Next Steps
Once completed, you're ready to integrate with your newly created app and keyset!
Last updated