private void OnNetworkCustomError(object sender, GameEventArgs e)
 {
     UnityGameFramework.Runtime.NetworkCustomErrorEventArgs ne = (UnityGameFramework.Runtime.NetworkCustomErrorEventArgs)e;
     if (ne.NetworkChannel != m_NetworkChannel)
     {
         return;
     }
 }
        /// <summary>
        /// 创建用户自定义网络错误事件。
        /// </summary>
        /// <param name="e">内部事件。</param>
        /// <returns>创建的用户自定义网络错误事件。</returns>
        public static NetworkCustomErrorEventArgs Create(GameFramework.Network.NetworkCustomErrorEventArgs e)
        {
            NetworkCustomErrorEventArgs networkCustomErrorEventArgs = ReferencePool.Acquire <NetworkCustomErrorEventArgs>();

            networkCustomErrorEventArgs.NetworkChannel  = e.NetworkChannel;
            networkCustomErrorEventArgs.CustomErrorData = e.CustomErrorData;
            return(networkCustomErrorEventArgs);
        }
    private void OnNetworkCustomError(object sender, GameFramework.Event.GameEventArgs e)
    {
        UnityGameFramework.Runtime.NetworkCustomErrorEventArgs ne = (UnityGameFramework.Runtime.NetworkCustomErrorEventArgs)e;
        if (ne.NetworkChannel != m_NetworkChannel)
        {
            return;
        }

        if (ne.CustomErrorData != null)
        {
            Log.Error("Network Packet {0} CustomError : {1}.", ne.Id, ne.CustomErrorData);
        }
    }
Example #4
0
 private void OnNetworkCustomError(object sender, GameFramework.Network.NetworkCustomErrorEventArgs e)
 {
     m_EventComponent.Fire(this, NetworkCustomErrorEventArgs.Create(e));
 }