GetActiveReceiverType
Namespace: SynicSugar.P2P
Class: p2pInfo
public ReceiverType GetActiveReceiverType ()
public enum ReceiverType {
None, FixedUpdate, Update, LateUpdate, Synic
}
Description
Gets the currently valid (active) packet receiver type.
using SynicSugar.P2P;
using UnityEngine;
[NetworkCommons]
public partial class p2pSample : MonoBehaviour {
public void Start(){
if(ReceiverType.None == p2pInfo.Instance.GetActiveReceiverType()){
ConnectHub.Instance.StartPacketReceiver(PacketReceiveTiming.FixedUpdate, 5);
//p2pInfo.Instance.GetActiveReceiverType() becomes ReceiverType.FixedUpdate
}
}
}