Skip to main content

Unsubscribe from Channel

Leave (unsubscribe from) a specific channel.

Method Information

ItemContent
MethodAChatManager::GetInstance()->Unsubscribe(const FString& Channel)
CallbackOnUnSubscribed(const FChatUserInfo& User) - Called when user leaves

Parameters

ParameterTypeDescription
ChannelFStringChannel name to unsubscribe from

Code Example

void UMyGame::ExitChannel(const FString& ChannelName)
{
AChatManager::GetInstance()->Unsubscribe(ChannelName);
}

void UMyGame::OnUnSubscribed(const FChatUserInfo& User)
{
UE_LOG(LogTemp, Log, TEXT("%s left"), *User.visitorName);
}