- LocalizationManager: 新增翻译表(SetFormatted/SetDuration/LocalizeOperateMsg) - LoginPanel: InputField placeholder本地化、字体颜色保持 - HistoryPanel: 用时数据本地化、placeholder本地化 - RecordDetailPanel: 操作详情消息本地化(LanguageChanged重建) - AppraiseWindowBase: 评价等级本地化、操作消息重建 - EditorAppraiser: 所有评估消息改用InjectOperateMsgLocalized - StudentOperateRecorder: 新增InjectOperateMsgLocalized方法 - LocalizationLanguageTestBar: 单例模式、ScreenSpaceOverlay筛选 - 字体切换时保留颜色和verticalOverflow
51 lines
1.9 KiB
C#
51 lines
1.9 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using XFramework;
|
|
|
|
public class ByteHelperTest : MonoBehaviour
|
|
{
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
|
|
Dictionary<string, TransGesture> testDic = new Dictionary<string, TransGesture>();
|
|
testDic.Add("dasdsa", new TransGesture(Vector3.one, Vector3.one));
|
|
testDic.Add("sdadsad", new TransGesture(Vector3.one, Vector3.one));
|
|
//byte[] bytes = BytesHelper.ClassToBytes<Dictionary<string, TransGesture>>(testDic);
|
|
|
|
|
|
|
|
List<TransGesture> transGestures = new List<TransGesture>();
|
|
transGestures.Add(new TransGesture(Vector3.one, Vector3.one));
|
|
transGestures.Add(new TransGesture(Vector3.positiveInfinity, Vector3.one));
|
|
byte[] listbytes = BytesHelper.ClassToBytes<List<TransGesture>>(transGestures);
|
|
|
|
List<TransGesture> desList = BytesHelper.BytesToClass<List<TransGesture>>(listbytes);
|
|
|
|
|
|
SceneSyncData sceneSyncData = new SceneSyncData();
|
|
sceneSyncData.syncGGDic = new Dictionary<string, TransGesture>();
|
|
sceneSyncData.syncGGDic.Add("dsaas", new TransGesture(new Vector3(1.54456f,5.4564565f,8.456451321f), Vector3.one));
|
|
sceneSyncData.syncGGDic.Add("sssss", new TransGesture(Vector3.one, Vector3.one));
|
|
byte[] bytes = BytesHelper.ClassToBytes<SceneSyncData>(sceneSyncData);
|
|
|
|
//byte[] structBytes = BytesHelper.StructToBytes<TransGesture>(sceneSyncData.syncGGDic["dsaas"]);
|
|
|
|
SceneSyncProtoBuilder builder = new SceneSyncProtoBuilder(sceneSyncData);
|
|
byte[] protoBuilderBytes = builder.GetProto().Encode();
|
|
|
|
ABSceneSyncExcute aBSceneSync = new ABSceneSyncExcute();
|
|
aBSceneSync.NetExcute(new ExcuteParam("dsad", "test", (ProtocolByte)builder.GetProto()));
|
|
|
|
Debug.Log("s");
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
}
|