This version of Unity is unsupported.
Method group is Obsolete

ConnectionConfig.GetChannel

Obsolete The UNET transport will be removed in the future as soon a replacement is ready.

Declaration

public Networking.QosType GetChannel(byte idx);

Parameters

idx Index in array.

Returns

QosType Channel QoS.

Description

Return the QoS set for the given channel or throw an out of range exception.

using UnityEngine;
using UnityEngine.Networking;

public class ExampleScript : MonoBehaviour { void Start() { 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);

for (int i = 0; i < myConfig.ChannelCount; ++i) { Debug.Log("Channel: " + i + " has qos: " + myConfig.Channels[i]); } } }