Unsubscribe from Channel
Leave (unsubscribe from) a specific channel.
Method Information
| Item | Content |
|---|---|
| Method | AChatManager::GetInstance()->Unsubscribe(const FString& Channel) |
| Callback | OnUnSubscribed(const FChatUserInfo& User) - Called when user leaves |
Parameters
| Parameter | Type | Description |
|---|---|---|
| Channel | FString | Channel 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);
}