网上演练
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
865 B

using System;
using System.Collections;
using System.Collections.Generic;
using AX.Network.Protocols;
using UnityEngine;
using AX.Network.Common;
using AX.NetworkSystem;
using AX.Serialization;
public class SEND_FILE_SYNC : NetworkMessageBehaviour
{
private string filename;
private string newTag;
protected override void Execute(BinaryMessage message)
{
var info = (KeyValuePair<string, ArraySegment<byte>>)message.Tag;
filename = info.Key;
newTag = info.Value.Deserialize<string>();
}
private void OnGUI()
{
GUILayout.BeginArea(new Rect(0, 400, 800, 200));
GUILayout.BeginVertical();
if (!string.IsNullOrEmpty(filename))
GUILayout.Label("接收到一个文件: " + filename + ", 参数: " + newTag);
GUILayout.EndVertical();
GUILayout.EndArea();
}
}