RTCManager
Namespace: SynicSugar.RTC
Description
Manage around RTC on session.
This script is Mono's Singleton attached to NetworkManager. To generate NetworkManager, right-click on the Hierarchy and click SynicSugar/NetworkManager
NetworkManager has DontDestroy, so NetworkManager will not be destroyed by scene transitions.
Properity
API | description |
---|---|
ParticipantUpdatedNotifier | Notification whether a member is speaking |
UseOpenVC | OpenVC or PushToTalk |
KeyToPushToTalk | the key or keycode for PushToTalk |
LastStateUpdatedUserId | ID of the user whose status was last updated |
TargetOutputedVolumeOnLocal | Outputed volume on this local of target |
IsTargetMutedOnLocal | Target state is mute or not |
IsTargetHardMuted | Target state is hard mute or not |
Function
API | description |
---|---|
StartVoiceSending | Starts local user sending voice chat |
StopVoiceSending | Stop local user sending voice chat |
ToggleLocalUserSending | Switch Input setting of Local user sending |
ToggleReceiveingFromTarget | Switch Output setting(Enable or Mute) of receiving from target |
UpdateReceiveingVolumeFromTarget | Change the receiving volume on this Session |
HardMuteTargetUser | Host mutes target user('s input) |
using SynicSugar.P2P;
using SynicSugar.RTC;
using UnityEngine;
public class NetworkSample : MonoBehaviour {
void Start() {
//Start ReceivingVC on StartPacketReceiver().
RTCManager.Instance.StartVoiceSending();
}
public void BanTarget(UserId target){
RTCManager.Instance.HardMuteTargetUser(target, true);
}
}