ChannelGroup Entity

As of version 1.1.0, the Unreal Engine software development kit (SDK) supports entities. Entities are SDK objects that bundle operations for a specific resource type and simplify working with PubNub application programming interfaces (APIs).

Use entities to perform common tasks without manually wiring requests. Some PubNub APIs are exposed via entities. Other operations remain available on the PubnubSubsystem object.

Create ChannelGroup

Use this factory method to return a local ChannelGroup entity for a single channel group. A ChannelGroup entity centralizes operations—such as creating a subscription—so you can prototype and build faster.

UPubnubChannelGroupEntity* CreateChannelGroupEntity(FString ChannelGroup);
* required
ParameterDescription
ChannelGroup *
Type: FString
Name of the channel group for which to create the entity.

Sample code

Reference code
This example is a self-contained code snippet ready to be run. It includes necessary imports and executes methods with console logging. Use it as a reference when working with other examples in this document.

Available operations

The ChannelGroup entity provides operations for PubNub channel groups.

Operation (click for more information)Description
CreateSubscription(SubscribeSettings)
Returns a local channel group subscription object with optional parameters. You can then subscribe to receive real-time updates for that channel group.
AddChannelToGroup(Channel, OnAddChannelToGroupResponse)
Adds a channel to the channel group. Requires the Stream Controller add-on.
RemoveChannelFromGroup(Channel, OnRemoveChannelFromGroupResponse)
Removes a channel from the channel group. Requires the Stream Controller add-on.
ListChannelsFromGroup(OnListChannelsResponse)
Lists all channels in the channel group. Requires the Stream Controller add-on.
RemoveChannelGroup(OnRemoveChannelGroupResponse)
Removes the entire channel group. Requires the Stream Controller add-on.
Last updated on