Version: 5.6
public List<ChannelQOS> Channels ;

설명

The list of channels belonging to the current configuration.

Note: any ConnectionConfig passed as a parameter to a function in Unity Multiplayer is deep copied (that is, an entirely new copy is made, with no references to the original).

ConnectionConfig myConfig = new ConnectionConfig();
myConfig.AddChannel(QosType.Unreliable);
myConfig.AddChannel(QosType.UnreliableFragmented);
myConfig.AddChannel(QosType.UnreliableSequenced);
myConfig.AddChannel(QosType.Reliable);
myConfig.AddChannel(QosType.ReliableFragmented);
myConfig.AddChannel(QosType.ReliableSequenced);
myConfig.AddChannel(QosType.StateUpdate);
myConfig.AddChannel(QosType.ReliableStateUpdate);
myConfig.AddChannel(QosType.AllCostDelivery);

myConfig.Channels[0] = QosType.Reliable;

for (int i = 0; i < myConfig.ChannelCount; ++i) { Debug.Log("Channel: " + i + " has qos: " + myConfig.Channels[i]); }
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961