Legacy Documentation: Version 5.6 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

ConnectionConfig.Channels

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public var Channels: List<ChannelQOS>;
public List<ChannelQOS> Channels;

Description

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).

no example available in JavaScript
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]); }