From 4233d2a78fd7584e2b9b23cdaf1cf2ce01ad9724 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E9=93=AE?= <834207172@qq.com> Date: Wed, 24 Sep 2025 15:52:54 +0800 Subject: [PATCH 1/9] 1 --- Assets/Resources/DOTweenSettings.asset | 2 +- Assets/Resources/HotfixMainResDomain.asset | 25 +++++++++++++++++++ .../Resources/HotfixMainResDomain.asset.meta | 8 ++++++ Assets/Resources/YooAssetSettings.asset | 16 ++++++++++++ Assets/Resources/YooAssetSettings.asset.meta | 8 ++++++ 5 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 Assets/Resources/HotfixMainResDomain.asset create mode 100644 Assets/Resources/HotfixMainResDomain.asset.meta create mode 100644 Assets/Resources/YooAssetSettings.asset create mode 100644 Assets/Resources/YooAssetSettings.asset.meta diff --git a/Assets/Resources/DOTweenSettings.asset b/Assets/Resources/DOTweenSettings.asset index 62ebbaf..e75d697 100644 --- a/Assets/Resources/DOTweenSettings.asset +++ b/Assets/Resources/DOTweenSettings.asset @@ -49,6 +49,6 @@ MonoBehaviour: deAudioEnabled: 0 deUnityExtendedEnabled: 0 epoOutlineEnabled: 0 - createASMDEF: 0 + createASMDEF: 1 showPlayingTweens: 0 showPausedTweens: 0 diff --git a/Assets/Resources/HotfixMainResDomain.asset b/Assets/Resources/HotfixMainResDomain.asset new file mode 100644 index 0000000..e495fa4 --- /dev/null +++ b/Assets/Resources/HotfixMainResDomain.asset @@ -0,0 +1,25 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1a78aa2541a743f89b2646efe4073f01, type: 3} + m_Name: HotfixMainResDomain + m_EditorClassIdentifier: com.stary.evo.runtime:Stary.Evo:HotfixMainResDomain + hotfixMainResDomainEntity: + ipconfig: http://192.168.31.67:9527 + mainDomainVersion: + username: admin2023 + password: admin@2023 + projectInfo: + projectName: + projectCode: + projectPackageName: com.xosmo. + loadingScene: {fileID: 0} + loadingScenePath: diff --git a/Assets/Resources/HotfixMainResDomain.asset.meta b/Assets/Resources/HotfixMainResDomain.asset.meta new file mode 100644 index 0000000..1008477 --- /dev/null +++ b/Assets/Resources/HotfixMainResDomain.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: baae28693819e9642b1bb2f800ecce11 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/YooAssetSettings.asset b/Assets/Resources/YooAssetSettings.asset new file mode 100644 index 0000000..3eb9a3c --- /dev/null +++ b/Assets/Resources/YooAssetSettings.asset @@ -0,0 +1,16 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5bd1afdce9715f84eb4cbc901922afc2, type: 3} + m_Name: YooAssetSettings + m_EditorClassIdentifier: + DefaultYooFolderName: xosmoRes + PackageManifestPrefix: diff --git a/Assets/Resources/YooAssetSettings.asset.meta b/Assets/Resources/YooAssetSettings.asset.meta new file mode 100644 index 0000000..3265cc9 --- /dev/null +++ b/Assets/Resources/YooAssetSettings.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: eb7c33b4b4bdc2c4c8a7fe94c23ad152 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: From 9ed2f1a91188b0df68210c784bb1ff7134acfba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E9=93=AE?= <834207172@qq.com> Date: Wed, 24 Sep 2025 15:58:54 +0800 Subject: [PATCH 2/9] 1 --- .../Runtime/Tool/WebRequest/WebRequestSystem.cs | 14 ++++++++++++++ Assets/00.StaryEvo/package.json | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Assets/00.StaryEvo/Runtime/Tool/WebRequest/WebRequestSystem.cs b/Assets/00.StaryEvo/Runtime/Tool/WebRequest/WebRequestSystem.cs index 49c08c7..753da37 100644 --- a/Assets/00.StaryEvo/Runtime/Tool/WebRequest/WebRequestSystem.cs +++ b/Assets/00.StaryEvo/Runtime/Tool/WebRequest/WebRequestSystem.cs @@ -18,7 +18,12 @@ namespace Stary.Evo static WebRequestSystem() { +#if UNITY_EDITOR authorization = EditorPrefs.GetString("Authorization"); +#else + authorization = PlayerPrefs.GetString("Authorization"); +#endif + } public static async Task Login(string url, string username, string password) @@ -64,7 +69,12 @@ namespace Stary.Evo JsonConvert.DeserializeObject(authResponse.data.ToString()); Debug.Log("UnityEvo:AuthenticationResponse" + authResponseData.Token); authorization = authResponseData.Token; +#if UNITY_EDITOR EditorPrefs.SetString("Authorization", authorization); +#else + PlayerPrefs.SetString("Authorization",authorization); +#endif + Debug.Log("UnityEvo:登录成功"); return true; } @@ -87,7 +97,11 @@ namespace Stary.Evo /// public static async Task GetValidateToken(string url) { +#if UNITY_EDITOR authorization = EditorPrefs.GetString("Authorization"); +#else + authorization = PlayerPrefs.GetString("Authorization"); +#endif try { diff --git a/Assets/00.StaryEvo/package.json b/Assets/00.StaryEvo/package.json index 44e16f6..f1f9f30 100644 --- a/Assets/00.StaryEvo/package.json +++ b/Assets/00.StaryEvo/package.json @@ -1,6 +1,6 @@ { "name": "com.staryevo.main", - "version": "2.0.7", + "version": "2.0.8", "displayName": "00.StaryEvo", "description": "This is an Framework package(后台服务器版本,端口9527)", "unity": "2021.3", From 43334afb4baf48f6e28ae10436bfd9eb2e7014a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E9=93=AE?= <834207172@qq.com> Date: Wed, 24 Sep 2025 16:21:43 +0800 Subject: [PATCH 3/9] 1 --- Assets/06.UIFarme/Editor/UICreateWindow.cs | 6 +++--- Assets/06.UIFarme/package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Assets/06.UIFarme/Editor/UICreateWindow.cs b/Assets/06.UIFarme/Editor/UICreateWindow.cs index e2a7339..ed67c3a 100644 --- a/Assets/06.UIFarme/Editor/UICreateWindow.cs +++ b/Assets/06.UIFarme/Editor/UICreateWindow.cs @@ -15,7 +15,7 @@ public class UICreateWindow : EditorWindow { #region MenuItem - [MenuItem("Assets/Evo/UI工具/CreateUI")] + [MenuItem("Evo/UI管理/CreateUI")] private static void CopyUI() { if (Selection.activeObject == null || !(Selection.activeObject is GameObject)) @@ -27,7 +27,7 @@ public class UICreateWindow : EditorWindow UICreateWindow.OpenWindow().uiPrefab = Selection.activeObject as GameObject; } - [MenuItem("Evo/UI管理")] + [MenuItem("Evo/UI管理/OpenWindow")] public static UICreateWindow OpenWindow() { var window = GetWindow("UI管理"); @@ -381,7 +381,7 @@ public class UICreateWindow : EditorWindow private void DomainPathField() { - var path = $"Assets/Domain/{_domainNames[_domainIndex]}/AddressableRes/Config/UIConfig.asset"; + var path = $"Assets/Domain/{_domainNames[_domainIndex]}/AddressableRes/Conf/UIConfig.asset"; if (_uiConfigObj == null) { diff --git a/Assets/06.UIFarme/package.json b/Assets/06.UIFarme/package.json index f1ac3a6..678a43f 100644 --- a/Assets/06.UIFarme/package.json +++ b/Assets/06.UIFarme/package.json @@ -1,7 +1,7 @@ { "name": "com.staryevo.uifarme", "displayName": "06.UIFarme", - "version": "2.0.1", + "version": "2.0.2", "description": "UI框架工具", "unity": "2021.3", "unityRelease": "30f1", From 5e7c399e4dae7191f1e82bf9b4e0521581ff7f35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E9=93=AE?= <834207172@qq.com> Date: Wed, 24 Sep 2025 16:33:01 +0800 Subject: [PATCH 4/9] 1 --- Assets/06.UIFarme/Editor/UICreateWindow.cs | 2 +- Assets/06.UIFarme/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/06.UIFarme/Editor/UICreateWindow.cs b/Assets/06.UIFarme/Editor/UICreateWindow.cs index ed67c3a..d7a6096 100644 --- a/Assets/06.UIFarme/Editor/UICreateWindow.cs +++ b/Assets/06.UIFarme/Editor/UICreateWindow.cs @@ -381,7 +381,7 @@ public class UICreateWindow : EditorWindow private void DomainPathField() { - var path = $"Assets/Domain/{_domainNames[_domainIndex]}/AddressableRes/Conf/UIConfig.asset"; + var path = $"Assets/Domain/{_domainNames[_domainIndex]}/AddressableRes/Config/UIConfig.asset"; if (_uiConfigObj == null) { diff --git a/Assets/06.UIFarme/package.json b/Assets/06.UIFarme/package.json index 678a43f..4cc721c 100644 --- a/Assets/06.UIFarme/package.json +++ b/Assets/06.UIFarme/package.json @@ -1,7 +1,7 @@ { "name": "com.staryevo.uifarme", "displayName": "06.UIFarme", - "version": "2.0.2", + "version": "2.0.3", "description": "UI框架工具", "unity": "2021.3", "unityRelease": "30f1", From f9575180f3a9189979b4ec44b5428674e59e70c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E9=93=AE?= <834207172@qq.com> Date: Wed, 24 Sep 2025 17:16:12 +0800 Subject: [PATCH 5/9] 1 --- Assets/06.UIFarme/Editor/UICreateWindow.cs | 31 ++++++++++++++-------- Assets/06.UIFarme/package.json | 2 +- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/Assets/06.UIFarme/Editor/UICreateWindow.cs b/Assets/06.UIFarme/Editor/UICreateWindow.cs index d7a6096..5d2e560 100644 --- a/Assets/06.UIFarme/Editor/UICreateWindow.cs +++ b/Assets/06.UIFarme/Editor/UICreateWindow.cs @@ -51,6 +51,7 @@ public class UICreateWindow : EditorWindow private string _uiViewTemplate = "UIViewTemplate"; private string _uiConfig = "UIConfig"; private string _uiName; + private string _saveUIPath; public GameObject uiPrefab; private Dictionary _uiNames = new Dictionary(); private Dictionary _uiJsonDatas = new Dictionary(); @@ -77,6 +78,7 @@ public class UICreateWindow : EditorWindow _uiJsonDatas.Clear(); _uiNames.Clear(); uiViews = ReflectionHelper.GetAllUIViewTypes(_domainNames[_domainIndex]); + _saveUIPath = EditorPrefs.GetString(nameof(_saveUIPath)); DomainPathField(); foreach (var uiView in uiViews) { @@ -89,6 +91,7 @@ public class UICreateWindow : EditorWindow _uiNames.AddOrUpdate(str, scriptPath); } } + private void OnGUI() { EditorGUILayout.LabelField("通过[Evo/UI管理]可以打开"); @@ -106,12 +109,13 @@ public class UICreateWindow : EditorWindow { _scroll2 = EditorGUILayout.BeginScrollView(_scroll2, "box", GUILayout.Width(position.width * 0.4f - 6)); { - var tempIndex =EditorGUILayout.Popup("Domain", _domainIndex, _domainNames); + var tempIndex = EditorGUILayout.Popup("Domain", _domainIndex, _domainNames); if (tempIndex != _domainIndex) { ValueChang(); _domainIndex = tempIndex; } + EditorGUILayout.HelpBox("已创建的UI", MessageType.Info); _mInput = EditorGUILayout.TextField(_mInput, EditorStyles.toolbarSearchField, GUILayout.Height(20)); @@ -127,6 +131,7 @@ public class UICreateWindow : EditorWindow { jsonData = new UIConfigJson(); } + if (string.IsNullOrEmpty(scriptPath)) continue; var defaultColor = GUI.color; @@ -160,16 +165,21 @@ public class UICreateWindow : EditorWindow var uiScriptPath = GetUIScript(_uiName); if (string.IsNullOrEmpty(uiScriptPath)) { - var saveUIPath= $"Assets/Domain/{_domainNames[_domainIndex]}/Scripts/UI"; - if (GUILayout.Button($"选择创建路径:{saveUIPath}")) + if (string.IsNullOrEmpty(_saveUIPath)) { - var newPath = EditorUtility.OpenFolderPanel("UI生成路径", saveUIPath, ""); - saveUIPath = newPath.Replace(Application.dataPath, "Assets"); + _saveUIPath = $"Assets/Domain/{_domainNames[_domainIndex]}/HotUpdate/UI"; + } + + if (GUILayout.Button($"选择创建路径:{_saveUIPath}")) + { + var newPath = EditorUtility.OpenFolderPanel("UI生成路径", _saveUIPath, ""); + _saveUIPath = newPath.Replace(Application.dataPath, "Assets"); + EditorPrefs.SetString(nameof(_saveUIPath), _saveUIPath); } if (uiPrefab != null) { - EditorGUILayout.TextField("UI生成路径", $"{saveUIPath}/{_uiName}.cs"); + EditorGUILayout.TextField("UI生成路径", $"{_saveUIPath}/{_uiName}.cs"); } _isWindow = EditorGUILayout.Toggle("是否为窗口", _isWindow); @@ -189,7 +199,7 @@ public class UICreateWindow : EditorWindow str = Regex.Replace(str, "//UIControlData", uiControlData != null ? UnityEngine.GUIUtility.systemCopyBuffer : ""); - string newPath = $"{saveUIPath}/{_uiName}.cs"; + string newPath = $"{_saveUIPath}/{_uiName}.cs"; File.WriteAllText(newPath, str); var jsonData = new UIConfigJson @@ -227,6 +237,7 @@ public class UICreateWindow : EditorWindow jsonData.uiType = _uiName; _uiJsonDatas.AddOrUpdate(_uiName, jsonData); } + if (UnityEditor.PrefabUtility.IsPartOfPrefabAsset(uiPrefab)) { // 预制体资源就是自身 @@ -335,7 +346,7 @@ public class UICreateWindow : EditorWindow return string.Empty; } - // if (GetUIJson(name) == null) return string.Empty; + // if (GetUIJson(name) == null) return string.Empty; string[] ids = AssetDatabase.FindAssets(name); if (ids != null) @@ -438,6 +449,7 @@ static class ReflectionHelper Debug.LogError($"未找到名为HotUpdate_{domainName}的程序集"); return null; } + try { result.AddRange(targetAssembly.GetTypes() @@ -465,7 +477,4 @@ static class ReflectionHelper return result; } - - - } \ No newline at end of file diff --git a/Assets/06.UIFarme/package.json b/Assets/06.UIFarme/package.json index 4cc721c..5806fd6 100644 --- a/Assets/06.UIFarme/package.json +++ b/Assets/06.UIFarme/package.json @@ -1,7 +1,7 @@ { "name": "com.staryevo.uifarme", "displayName": "06.UIFarme", - "version": "2.0.3", + "version": "2.0.4", "description": "UI框架工具", "unity": "2021.3", "unityRelease": "30f1", From 7f42b8b4517be47b195d9bdff20638ce28c95508 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E9=93=AE?= <834207172@qq.com> Date: Mon, 29 Sep 2025 18:24:13 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E3=80=90m=E3=80=91111?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BuildAsset/BuildAssetDataSetting.cs | 25 -- .../Tool/WebRequest/WebRequestSystem.cs | 15 +- .../RunTime/UIFramework/Runtime.meta | 3 - .../Editor/Script/CreatPointModelWindow.cs | 214 ++++++++++++++++++ .../Script/CreatPointModelWindow.cs.meta | 11 + .../Script/com.pointcloud.editor.asmdef | 3 +- 6 files changed, 240 insertions(+), 31 deletions(-) delete mode 100644 Assets/06.UIFarme/RunTime/UIFramework/Runtime.meta create mode 100644 Assets/11.PointCloudTools/Editor/Script/CreatPointModelWindow.cs create mode 100644 Assets/11.PointCloudTools/Editor/Script/CreatPointModelWindow.cs.meta diff --git a/Assets/00.StaryEvo/Editor/BuildAsset/BuildAssetDataSetting.cs b/Assets/00.StaryEvo/Editor/BuildAsset/BuildAssetDataSetting.cs index 5980a83..c4b1ac6 100644 --- a/Assets/00.StaryEvo/Editor/BuildAsset/BuildAssetDataSetting.cs +++ b/Assets/00.StaryEvo/Editor/BuildAsset/BuildAssetDataSetting.cs @@ -112,14 +112,6 @@ namespace Stary.Evo.Editor } - // - // [Title("加密列表", titleAlignment: TitleAlignments.Centered)] - // [HorizontalGroup("BuildPipeline"), HideLabel] - // [ValueDropdown("GetEncryptionServices")] - // [OnValueChanged("SetEncryptionServices")] - // public Type encryption; - - [HideLabel] public AbstractBuildPipelineViewer viewer; @@ -227,23 +219,6 @@ namespace Stary.Evo.Editor _viewers.Add(selectedBuildPipelines, viewer); } } - - // private List GetEncryptionServices() - // { - // var encryptionClassTypes = EditorTools.GetAssignableTypes(typeof(IEncryptionServices)); - // if (encryption.IsNull()) - // { - // encryption = encryptionClassTypes[0]; - // } - // - // return encryptionClassTypes; - // } - // - // private void SetEncryptionServices() - // { - // AssetBundleBuilderSetting.SetPackageEncyptionClassName(packageName, selectedBuildPipelines, - // encryption.FullName); - // } } public enum VersionPosType diff --git a/Assets/00.StaryEvo/Runtime/Tool/WebRequest/WebRequestSystem.cs b/Assets/00.StaryEvo/Runtime/Tool/WebRequest/WebRequestSystem.cs index 753da37..f67cc8a 100644 --- a/Assets/00.StaryEvo/Runtime/Tool/WebRequest/WebRequestSystem.cs +++ b/Assets/00.StaryEvo/Runtime/Tool/WebRequest/WebRequestSystem.cs @@ -144,7 +144,7 @@ namespace Stary.Evo /// 获取Token值的服务URL地址(很重要) /// 传入请求的参数,此处参数为JOSN格式 /// - public static async Task PostFile(string url, string[] path) + public static async Task PostFile(string url, string[] path,Action uploadProgress = null) { if (!GetTokenState()) { @@ -174,7 +174,18 @@ namespace Stary.Evo webRequest.disposeDownloadHandlerOnDispose = true; webRequest.disposeCertificateHandlerOnDispose = true; webRequest.timeout = 60; - await webRequest.SendWebRequest(); + + // 发送请求但不等待完成 + var operation = webRequest.SendWebRequest(); + // 轮询获取上传进度 + while (!operation.isDone) + { + // 调用进度回调函数 + uploadProgress?.Invoke(webRequest.uploadProgress); + // 等待一帧,避免阻塞 + await UniTask.Yield(); + } + webRequest.uploadHandler?.Dispose(); // 更新错误检查方式 if (webRequest.result == UnityWebRequest.Result.ConnectionError || diff --git a/Assets/06.UIFarme/RunTime/UIFramework/Runtime.meta b/Assets/06.UIFarme/RunTime/UIFramework/Runtime.meta deleted file mode 100644 index 5f5a5d1..0000000 --- a/Assets/06.UIFarme/RunTime/UIFramework/Runtime.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 125226ccd07f47c5bf3b94157bf12fc3 -timeCreated: 1758179120 \ No newline at end of file diff --git a/Assets/11.PointCloudTools/Editor/Script/CreatPointModelWindow.cs b/Assets/11.PointCloudTools/Editor/Script/CreatPointModelWindow.cs new file mode 100644 index 0000000..96a880f --- /dev/null +++ b/Assets/11.PointCloudTools/Editor/Script/CreatPointModelWindow.cs @@ -0,0 +1,214 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using Cysharp.Threading.Tasks; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using Sirenix.OdinInspector; +using Sirenix.OdinInspector.Editor; +using Stary.Evo; +using Stary.Evo.Editor; +using Stary.Evo.Editor.Entity; +using UnityEditor; +using UnityEngine; + +public class CreatPointModelWindow : OdinEditorWindow +{ + private static List _modelTypes; + public static List ScenarioTypes; + + [MenuItem("Evo/创建ModelLibrary")] + private static async void Init() + { + _modelTypes = await GetModelTypes(); + ScenarioTypes = await GetScenarioTypes(); + // Get existing open window or if none, make a new one: + CreatPointModelWindow window = (CreatPointModelWindow)EditorWindow.GetWindow(typeof(CreatPointModelWindow)); + window.Show(); + } + + protected override void OnEnable() + { + base.OnEnable(); + documentFileid = EditorPrefs.GetString("documentFileid"); + modelType = EditorPrefs.GetString("modelType"); + scenarioType = EditorPrefs.GetString("scenarioType"); + } + + [TitleGroup("创建")] [InfoBox("Model名称")] + public string modelName; + + [TitleGroup("创建")] [InfoBox("Model描述")] [ValueDropdown("GetModelType")][OnValueChanged("SetModelType")] + public string modelType; + + [TitleGroup("创建")] [InfoBox("Scenario描述")] [ValueDropdown("GetScenarioType")][OnValueChanged("SetScenarioType")] + public string scenarioType; + + [TitleGroup("创建")] [ReadOnly] [InfoBox("文件所对应数据库id")] + public string documentFileid; + + private List GetModelType() => _modelTypes; + private List GetScenarioType() => ScenarioTypes; + + private void SetModelType() => EditorPrefs.SetString("modelType", modelType); + private void SetScenarioType() => EditorPrefs.SetString("scenarioType", scenarioType); + + private static async UniTask> GetModelTypes() + { + string ip = EditorPrefs.GetString("ip"); + if (string.IsNullOrEmpty(ip)) + { + EditorUtility.DisplayDialog("提示", "ip不能为空", "确定"); + return null; + } + + // var entity = new PointModelEntity + // { + // modelName = modelName, + // modelType = modelType, + // scenarioType = scenarioType, + // }; + //string postData = JsonConvert.SerializeObject(entity); + ResultMessageEntity entity = await WebRequestSystem.Get(ip, "/ModelLibrary/FindModelType"); + if (entity.code == 200) + { + var modelTypes = JsonConvert.DeserializeObject>(entity.data.ToString()); + return modelTypes; + } + else + { + return null; + } + } + + private static async UniTask> GetScenarioTypes() + { + string ip = EditorPrefs.GetString("ip"); + if (string.IsNullOrEmpty(ip)) + { + EditorUtility.DisplayDialog("提示", "ip不能为空", "确定"); + return null; + } + + ResultMessageEntity entity = await WebRequestSystem.Get(ip, "/SceneWork/FindScenarioType"); + if (entity.code == 200) + { + var scenarioTypes = JsonConvert.DeserializeObject>(entity.data.ToString()); + return scenarioTypes; + } + else + { + return null; + } + } + + [TitleGroup("创建")] + [Button("创建Model", ButtonSizes.Large)] + public async void CreatModel() + { + if (string.IsNullOrEmpty(modelName) || string.IsNullOrEmpty(modelType) || string.IsNullOrEmpty(scenarioType) || + string.IsNullOrEmpty(documentFileid)) + { + EditorUtility.DisplayDialog("提示", "modelName和modelType和scenarioType和documentFileid不能为空", "确定"); + return; + } + + string ip = EditorPrefs.GetString("ip"); + if (string.IsNullOrEmpty(ip)) + { + EditorUtility.DisplayDialog("提示", "ip不能为空", "确定"); + return; + } + + var pointModelEntity = new PointModelEntity + { + Name = modelName, + ModelType = modelType, + ScenarioType = scenarioType, + DocumentFileid = documentFileid, + }; + string postData = JsonConvert.SerializeObject(pointModelEntity); + ResultMessageEntity entity = await WebRequestSystem.Post($"{ip}/ModelLibrary/AddModel", postData); + if (entity.code == 200) + { + EditorUtility.DisplayDialog("提示", "创建成功", "确定"); + modelName = ""; + documentFileid = ""; + EditorPrefs.SetString("documentFileid",""); + EditorPrefs.SetString("modelType",""); + EditorPrefs.SetString("scenarioType",""); + } + else if (entity.code == 4009) + { + EditorUtility.DisplayDialog("提示", $"创建失败,存在相同名称元素", "确定"); + } + } + + [TitleGroup("上传")] [InfoBox("Model路径")] [Sirenix.OdinInspector.FilePath(Extensions = "$modelType")] + public string modelPath; + + [TitleGroup("上传")] [ReadOnly][HideLabel, ProgressBar(0, 100f)] + public float modelUpdateInterval = 0f; + + [TitleGroup("上传")] + [Button("上传Model", ButtonSizes.Large)] + public async void UpdateModel() + { + if (string.IsNullOrEmpty(modelPath)) + { + EditorUtility.DisplayDialog("提示", "modelPath不能为空", "确定"); + return; + } + + string ip = EditorPrefs.GetString("ip"); + if (string.IsNullOrEmpty(ip)) + { + EditorUtility.DisplayDialog("提示", "ip不能为空", "确定"); + return; + } + + var messageEntity = await WebRequestSystem.PostFile(ip + "/FileLoad/UpLoadFile", new[] { modelPath }, (progress) => + { + modelUpdateInterval = progress * 100f; + }); + + if (messageEntity.code == 200) + { + List resultMessageEntities = + JsonConvert.DeserializeObject>(messageEntity.data.ToString()); + if (resultMessageEntities.Count > 0) + { + foreach (var resultMessageEntity in resultMessageEntities) + { + var data = JsonConvert.DeserializeObject(resultMessageEntity.data.ToString()) as JObject; + documentFileid = data["id"].ToString(); + EditorPrefs.SetString("documentFileid", documentFileid); + } + } + } + } + + [Serializable] + public class PointModelEntity + { + /// + /// 模型名称 + /// + public string Name { get; set; } + + /// + /// 模型标签 + /// + public string ModelType { get; set; } + + /// + /// 场景标签 + /// + public string ScenarioType { get; set; } + + /// + /// 文件id + /// + public string DocumentFileid { get; set; } + } +} \ No newline at end of file diff --git a/Assets/11.PointCloudTools/Editor/Script/CreatPointModelWindow.cs.meta b/Assets/11.PointCloudTools/Editor/Script/CreatPointModelWindow.cs.meta new file mode 100644 index 0000000..06cfcff --- /dev/null +++ b/Assets/11.PointCloudTools/Editor/Script/CreatPointModelWindow.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 63cfd397008223c4cae6325df57adc06 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/11.PointCloudTools/Editor/Script/com.pointcloud.editor.asmdef b/Assets/11.PointCloudTools/Editor/Script/com.pointcloud.editor.asmdef index b26eeba..dba3ae0 100644 --- a/Assets/11.PointCloudTools/Editor/Script/com.pointcloud.editor.asmdef +++ b/Assets/11.PointCloudTools/Editor/Script/com.pointcloud.editor.asmdef @@ -2,7 +2,8 @@ "name": "com.pointcloud.reditor", "rootNamespace": "", "references": [ - "GUID:d1a793c2b6959e04ea45b972eaa369c8" + "GUID:d1a793c2b6959e04ea45b972eaa369c8", + "GUID:f51ebe6a0ceec4240a699833d6309b23" ], "includePlatforms": [ "Editor" From 6bb89aad3a3c959b2a3c8212b53309308d82f302 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E9=93=AE?= <834207172@qq.com> Date: Tue, 30 Sep 2025 15:55:11 +0800 Subject: [PATCH 7/9] 111 --- .../Editor/BuildAsset/CreatAssetWindow.cs | 5 +- .../Editor/BuildAsset/OneKeyBuildWindow.cs | 2 +- Assets/00.StaryEvo/package.json | 2 +- Assets/00.StaryEvoTools/package.json | 2 +- .../Editor/Script/CreatPointCloudWindow.cs | 3 +- .../Editor/Script/CreatPointModelWindow.cs | 324 ++++++++++++------ .../Script/Entity/ModelLibraryResponses.cs | 31 ++ .../Entity/ModelLibraryResponses.cs.meta | 3 + Assets/11.PointCloudTools/package.json | 2 +- 9 files changed, 265 insertions(+), 109 deletions(-) create mode 100644 Assets/11.PointCloudTools/Editor/Script/Entity/ModelLibraryResponses.cs create mode 100644 Assets/11.PointCloudTools/Editor/Script/Entity/ModelLibraryResponses.cs.meta diff --git a/Assets/00.StaryEvo/Editor/BuildAsset/CreatAssetWindow.cs b/Assets/00.StaryEvo/Editor/BuildAsset/CreatAssetWindow.cs index a74cfde..6e28e0d 100644 --- a/Assets/00.StaryEvo/Editor/BuildAsset/CreatAssetWindow.cs +++ b/Assets/00.StaryEvo/Editor/BuildAsset/CreatAssetWindow.cs @@ -211,7 +211,10 @@ namespace Stary.Evo.Editor } - [TitleGroup("预览Domain作用域")] public List domainList; + [TitleGroup("预览Domain作用域")] + [ListDrawerSettings(DraggableItems = false, ShowFoldout = false, ShowPaging = false, ShowItemCount = false, + HideRemoveButton = true,HideAddButton = true)] + public List domainList; protected override void Initialize() { diff --git a/Assets/00.StaryEvo/Editor/BuildAsset/OneKeyBuildWindow.cs b/Assets/00.StaryEvo/Editor/BuildAsset/OneKeyBuildWindow.cs index 10fc166..834075e 100644 --- a/Assets/00.StaryEvo/Editor/BuildAsset/OneKeyBuildWindow.cs +++ b/Assets/00.StaryEvo/Editor/BuildAsset/OneKeyBuildWindow.cs @@ -33,7 +33,7 @@ namespace Stary.Evo.Editor public bool isOneKeyBuild; [ListDrawerSettings(DraggableItems = false, ShowFoldout = false, ShowPaging = false, ShowItemCount = false, - HideRemoveButton = true)] + HideRemoveButton = true,HideAddButton = true)] public List OneKeyBuildEntities = new List(); protected override void Initialize() diff --git a/Assets/00.StaryEvo/package.json b/Assets/00.StaryEvo/package.json index f1f9f30..5efaebe 100644 --- a/Assets/00.StaryEvo/package.json +++ b/Assets/00.StaryEvo/package.json @@ -1,6 +1,6 @@ { "name": "com.staryevo.main", - "version": "2.0.8", + "version": "2.0.9", "displayName": "00.StaryEvo", "description": "This is an Framework package(后台服务器版本,端口9527)", "unity": "2021.3", diff --git a/Assets/00.StaryEvoTools/package.json b/Assets/00.StaryEvoTools/package.json index fd436e3..7b25621 100644 --- a/Assets/00.StaryEvoTools/package.json +++ b/Assets/00.StaryEvoTools/package.json @@ -1,6 +1,6 @@ { "name": "com.staryevo.tools", - "version": "1.1.0", + "version": "1.1.1", "displayName": "00.StaryEvo.Tools", "description": "This is an Framework package(后台服务器版本,端口9527)", "unity": "2021.3", diff --git a/Assets/11.PointCloudTools/Editor/Script/CreatPointCloudWindow.cs b/Assets/11.PointCloudTools/Editor/Script/CreatPointCloudWindow.cs index 3f7baad..d7338eb 100644 --- a/Assets/11.PointCloudTools/Editor/Script/CreatPointCloudWindow.cs +++ b/Assets/11.PointCloudTools/Editor/Script/CreatPointCloudWindow.cs @@ -65,7 +65,8 @@ namespace Stary.Evo.Editor } } - + [ListDrawerSettings(DraggableItems = false, ShowFoldout = false, ShowPaging = false, ShowItemCount = false, + HideRemoveButton = true,HideAddButton = true)] [TitleGroup("预览场景")] public List SceneWorkEntities; protected override async void Initialize() { diff --git a/Assets/11.PointCloudTools/Editor/Script/CreatPointModelWindow.cs b/Assets/11.PointCloudTools/Editor/Script/CreatPointModelWindow.cs index 96a880f..01de160 100644 --- a/Assets/11.PointCloudTools/Editor/Script/CreatPointModelWindow.cs +++ b/Assets/11.PointCloudTools/Editor/Script/CreatPointModelWindow.cs @@ -1,6 +1,7 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Linq; using Cysharp.Threading.Tasks; using Newtonsoft.Json; using Newtonsoft.Json.Linq; @@ -11,6 +12,7 @@ using Stary.Evo.Editor; using Stary.Evo.Editor.Entity; using UnityEditor; using UnityEngine; +using UnityEngine.Serialization; public class CreatPointModelWindow : OdinEditorWindow { @@ -35,16 +37,26 @@ public class CreatPointModelWindow : OdinEditorWindow scenarioType = EditorPrefs.GetString("scenarioType"); } - [TitleGroup("创建")] [InfoBox("Model名称")] + [TitleGroup("创建")] [HorizontalGroup("创建/数据")] [HideLabel] [InfoBox("Model名称")] public string modelName; - [TitleGroup("创建")] [InfoBox("Model描述")] [ValueDropdown("GetModelType")][OnValueChanged("SetModelType")] + [TitleGroup("创建")] + [HorizontalGroup("创建/数据")] + [HideLabel] + [InfoBox("Model描述")] + [ValueDropdown("GetModelType")] + [OnValueChanged("SetModelType")] public string modelType; - [TitleGroup("创建")] [InfoBox("Scenario描述")] [ValueDropdown("GetScenarioType")][OnValueChanged("SetScenarioType")] + [TitleGroup("创建")] + [HorizontalGroup("创建/数据")] + [HideLabel] + [InfoBox("Scenario描述")] + [ValueDropdown("GetScenarioType")] + [OnValueChanged("SetScenarioType")] public string scenarioType; - [TitleGroup("创建")] [ReadOnly] [InfoBox("文件所对应数据库id")] + [TitleGroup("上传")] [HorizontalGroup("上传/文件")] [HideLabel] [ReadOnly] [InfoBox("文件所对应数据库id")] public string documentFileid; private List GetModelType() => _modelTypes; @@ -53,6 +65,131 @@ public class CreatPointModelWindow : OdinEditorWindow private void SetModelType() => EditorPrefs.SetString("modelType", modelType); private void SetScenarioType() => EditorPrefs.SetString("scenarioType", scenarioType); + [TitleGroup("上传")] + [Button("创建Model", ButtonSizes.Large)] + public async void CreatModel() + { + if (string.IsNullOrEmpty(modelName) || string.IsNullOrEmpty(modelType) || string.IsNullOrEmpty(scenarioType) || + string.IsNullOrEmpty(documentFileid)) + { + EditorUtility.DisplayDialog("提示", "modelName和modelType和scenarioType和documentFileid不能为空", "确定"); + return; + } + + string ip = EditorPrefs.GetString("ip"); + if (string.IsNullOrEmpty(ip)) + { + EditorUtility.DisplayDialog("提示", "ip不能为空", "确定"); + return; + } + + var pointModelEntity = new + { + Name = modelName, + ModelType = modelType, + ScenarioType = scenarioType, + DocumentFileid = documentFileid, + }; + string postData = JsonConvert.SerializeObject(pointModelEntity); + ResultMessageEntity entity = await WebRequestSystem.Post($"{ip}/ModelLibrary/AddModel", postData); + if (entity.code == 200) + { + EditorUtility.DisplayDialog("提示", "创建成功", "确定"); + modelName = ""; + documentFileid = ""; + EditorPrefs.SetString("documentFileid", ""); + EditorPrefs.SetString("modelType", ""); + EditorPrefs.SetString("scenarioType", ""); + } + else if (entity.code == 4009) + { + EditorUtility.DisplayDialog("提示", $"创建失败,存在相同名称元素", "确定"); + } + } + + [TitleGroup("上传")] + [VerticalGroup("上传/文件/上传")] + [HideLabel] + [Sirenix.OdinInspector.FilePath(AbsolutePath = false, Extensions = "$modelType")] + [OnValueChanged("UpdateModel")] + public string modelPath; + + [TitleGroup("上传")] [VerticalGroup("上传/文件/上传")] [ReadOnly] [HideLabel, ProgressBar(0, 100f)] + public float modelUpdateInterval = 0f; + + public async void UpdateModel() + { + if (string.IsNullOrEmpty(modelPath)) + { + EditorUtility.DisplayDialog("提示", "modelPath不能为空", "确定"); + return; + } + + string ip = EditorPrefs.GetString("ip"); + if (string.IsNullOrEmpty(ip)) + { + EditorUtility.DisplayDialog("提示", "ip不能为空", "确定"); + return; + } + + var messageEntity = await WebRequestSystem.PostFile(ip + "/FileLoad/UpLoadFile", new[] { modelPath }, + (progress) => + { + modelUpdateInterval = progress * 100f; + if (progress >= 1) + { + EditorUtility.DisplayDialog("提示", $"上传成功!", "确定"); + } + }); + + if (messageEntity.code == 200) + { + List resultMessageEntities = + JsonConvert.DeserializeObject>(messageEntity.data.ToString()); + if (resultMessageEntities.Count > 0) + { + foreach (var resultMessageEntity in resultMessageEntities) + { + var data = JsonConvert.DeserializeObject(resultMessageEntity.data.ToString()) as JObject; + documentFileid = data["id"].ToString(); + EditorPrefs.SetString("documentFileid", documentFileid); + } + } + } + } + + [FormerlySerializedAs("PointModelEntities")] + [ListDrawerSettings(DraggableItems = false, ShowFoldout = false, ShowPaging = false, ShowItemCount = false, + HideRemoveButton = true, HideAddButton = true)] + [TitleGroup("预览模型")] + public List pointModelEntities; + + protected override async void Initialize() + { + base.Initialize(); + string ip = EditorPrefs.GetString("ip"); + if (string.IsNullOrEmpty(ip)) + { + EditorUtility.DisplayDialog("提示", "ip不能为空", "确定"); + return; + } + + ResultMessageEntity entity = await WebRequestSystem.Get(ip, "/ModelLibrary/FindModelAll"); + if (entity.code == 200) + { + var modelLibraryResponses = + JsonConvert.DeserializeObject>(entity.data.ToString()); + pointModelEntities = modelLibraryResponses.Select(x => new PointModelEntity(this) + { + id = x.id, + Name = x.Name, + ModelType = x.ModelType, + ScenarioType = x.ScenarioType, + DocumentFileid = x.DocumentFileid, + }).ToList(); + } + } + private static async UniTask> GetModelTypes() { string ip = EditorPrefs.GetString("ip"); @@ -62,18 +199,11 @@ public class CreatPointModelWindow : OdinEditorWindow return null; } - // var entity = new PointModelEntity - // { - // modelName = modelName, - // modelType = modelType, - // scenarioType = scenarioType, - // }; - //string postData = JsonConvert.SerializeObject(entity); ResultMessageEntity entity = await WebRequestSystem.Get(ip, "/ModelLibrary/FindModelType"); if (entity.code == 200) { - var modelTypes = JsonConvert.DeserializeObject>(entity.data.ToString()); - return modelTypes; + var modelTypes = JsonConvert.DeserializeObject(entity.data.ToString()); + return modelTypes.ToList(); } else { @@ -102,113 +232,101 @@ public class CreatPointModelWindow : OdinEditorWindow } } - [TitleGroup("创建")] - [Button("创建Model", ButtonSizes.Large)] - public async void CreatModel() - { - if (string.IsNullOrEmpty(modelName) || string.IsNullOrEmpty(modelType) || string.IsNullOrEmpty(scenarioType) || - string.IsNullOrEmpty(documentFileid)) - { - EditorUtility.DisplayDialog("提示", "modelName和modelType和scenarioType和documentFileid不能为空", "确定"); - return; - } - - string ip = EditorPrefs.GetString("ip"); - if (string.IsNullOrEmpty(ip)) - { - EditorUtility.DisplayDialog("提示", "ip不能为空", "确定"); - return; - } - - var pointModelEntity = new PointModelEntity - { - Name = modelName, - ModelType = modelType, - ScenarioType = scenarioType, - DocumentFileid = documentFileid, - }; - string postData = JsonConvert.SerializeObject(pointModelEntity); - ResultMessageEntity entity = await WebRequestSystem.Post($"{ip}/ModelLibrary/AddModel", postData); - if (entity.code == 200) - { - EditorUtility.DisplayDialog("提示", "创建成功", "确定"); - modelName = ""; - documentFileid = ""; - EditorPrefs.SetString("documentFileid",""); - EditorPrefs.SetString("modelType",""); - EditorPrefs.SetString("scenarioType",""); - } - else if (entity.code == 4009) - { - EditorUtility.DisplayDialog("提示", $"创建失败,存在相同名称元素", "确定"); - } - } - - [TitleGroup("上传")] [InfoBox("Model路径")] [Sirenix.OdinInspector.FilePath(Extensions = "$modelType")] - public string modelPath; - - [TitleGroup("上传")] [ReadOnly][HideLabel, ProgressBar(0, 100f)] - public float modelUpdateInterval = 0f; - - [TitleGroup("上传")] - [Button("上传Model", ButtonSizes.Large)] - public async void UpdateModel() - { - if (string.IsNullOrEmpty(modelPath)) - { - EditorUtility.DisplayDialog("提示", "modelPath不能为空", "确定"); - return; - } - - string ip = EditorPrefs.GetString("ip"); - if (string.IsNullOrEmpty(ip)) - { - EditorUtility.DisplayDialog("提示", "ip不能为空", "确定"); - return; - } - - var messageEntity = await WebRequestSystem.PostFile(ip + "/FileLoad/UpLoadFile", new[] { modelPath }, (progress) => - { - modelUpdateInterval = progress * 100f; - }); - - if (messageEntity.code == 200) - { - List resultMessageEntities = - JsonConvert.DeserializeObject>(messageEntity.data.ToString()); - if (resultMessageEntities.Count > 0) - { - foreach (var resultMessageEntity in resultMessageEntities) - { - var data = JsonConvert.DeserializeObject(resultMessageEntity.data.ToString()) as JObject; - documentFileid = data["id"].ToString(); - EditorPrefs.SetString("documentFileid", documentFileid); - } - } - } - } - [Serializable] public class PointModelEntity { + private readonly CreatPointModelWindow window; + + /// + /// id + /// + [HideInInspector] public string id; + /// /// 模型名称 /// - public string Name { get; set; } + [TitleGroup("$id")] [HorizontalGroup("$id/数据")] [HideLabel] [InfoBox("模型名称")] + public string Name; /// /// 模型标签 /// - public string ModelType { get; set; } + [TitleGroup("$id")] [HorizontalGroup("$id/数据")] [HideLabel] [InfoBox("模型标签")] [ValueDropdown("GetModelType")] + public string ModelType; /// /// 场景标签 /// - public string ScenarioType { get; set; } + [TitleGroup("$id")] [HorizontalGroup("$id/数据")] [HideLabel] [InfoBox("场景标签")] [ValueDropdown("GetScenarioType")] + public string ScenarioType; /// /// 文件id /// - public string DocumentFileid { get; set; } + [TitleGroup("$id")] [HorizontalGroup("$id/数据")] [HideLabel] [ReadOnly] [InfoBox("文件id")] + public string DocumentFileid; + + + public PointModelEntity(CreatPointModelWindow window) + { + this.window = window; + } + + [TitleGroup("$id")] + [HorizontalGroup("$id/button")] + [Button("", Icon = SdfIconType.ArrowUpCircleFill, IconAlignment = IconAlignment.RightEdge)] + public async void UpdatePointCloud() + { + string ip = EditorPrefs.GetString("ip"); + if (string.IsNullOrEmpty(ip)) + { + EditorUtility.DisplayDialog("提示", "ip不能为空", "确定"); + return; + } + + var pointModelEntity = new + { + Name = Name, + ModelType = ModelType, + ScenarioType = ScenarioType, + DocumentFileid = DocumentFileid, + }; + string body = JsonConvert.SerializeObject(pointModelEntity); + ResultMessageEntity entity = await WebRequestSystem.Put($"{ip}/ModelLibrary/UpdateModel", body); + if (entity.code == 200) + { + EditorUtility.DisplayDialog("提示", $"更新成功{pointModelEntity}", "确定"); + } + } + + [TitleGroup("$id")] + [HorizontalGroup("$id/button")] + [Button("", Icon = SdfIconType.XCircle, IconAlignment = IconAlignment.RightEdge)] + public async void DeletePointCloud() + { + string ip = EditorPrefs.GetString("ip"); + if (string.IsNullOrEmpty(ip)) + { + EditorUtility.DisplayDialog("提示", "ip不能为空", "确定"); + return; + } + + ResultMessageEntity entity = await WebRequestSystem.Delete(ip, $"/ModelLibrary/DeleteModelbyid/{id}"); + if (entity.code == 200) + { + window.pointModelEntities.Remove(this); + EditorUtility.DisplayDialog("提示", "删除成功", "确定"); + } + } + + private List GetModelType() + { + return window.GetModelType(); + } + + private List GetScenarioType() + { + return window.GetScenarioType(); + } } } \ No newline at end of file diff --git a/Assets/11.PointCloudTools/Editor/Script/Entity/ModelLibraryResponses.cs b/Assets/11.PointCloudTools/Editor/Script/Entity/ModelLibraryResponses.cs new file mode 100644 index 0000000..a0ad7e1 --- /dev/null +++ b/Assets/11.PointCloudTools/Editor/Script/Entity/ModelLibraryResponses.cs @@ -0,0 +1,31 @@ +namespace Stary.Evo.Editor.Entity +{ + public class ModelLibraryResponses + { + /// + /// id + /// + public string id { get; set; } + + /// + /// 名称 + /// + public string Name { get; set; } + + /// + /// 模型类别 + /// + public string ModelType { get; set; } + + /// + /// 使用场景类别 + /// + public string ScenarioType { get; set; } + + /// + /// 产品包路径 + /// + public string DocumentFileid { get; set; } + + } +} \ No newline at end of file diff --git a/Assets/11.PointCloudTools/Editor/Script/Entity/ModelLibraryResponses.cs.meta b/Assets/11.PointCloudTools/Editor/Script/Entity/ModelLibraryResponses.cs.meta new file mode 100644 index 0000000..8eb635a --- /dev/null +++ b/Assets/11.PointCloudTools/Editor/Script/Entity/ModelLibraryResponses.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 12a06324569c4a8588564b00a09af17f +timeCreated: 1759202524 \ No newline at end of file diff --git a/Assets/11.PointCloudTools/package.json b/Assets/11.PointCloudTools/package.json index b93f722..b61ac19 100644 --- a/Assets/11.PointCloudTools/package.json +++ b/Assets/11.PointCloudTools/package.json @@ -1,6 +1,6 @@ { "name": "com.pointcloud", - "version": "1.0.3", + "version": "1.0.4", "displayName": "11.PointCloudTools", "description": "点云开发工具", "unity": "2021.3", From b085bb31d08ecb80c07be6256802b1fe82f62ad5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E9=93=AE?= <834207172@qq.com> Date: Tue, 30 Sep 2025 16:10:13 +0800 Subject: [PATCH 8/9] 11 --- .../Runtime/HybridLoad/Fsm/ResStartState.cs | 2 -- .../Runtime/PanelTools/ProgressBarPanel.cs | 7 ------- .../Runtime/{UIQueue.meta => Tools/PanelSystem.meta} | 2 +- .../Runtime/{UIQueue => Tools/PanelSystem}/Base.meta | 2 +- .../{UIQueue => Tools/PanelSystem}/Base/BasePanel.cs | 0 .../{UIQueue => Tools/PanelSystem}/Base/BasePanel.cs.meta | 2 +- .../Runtime/{UIQueue => Tools/PanelSystem}/Manager.meta | 2 +- .../{UIQueue => Tools/PanelSystem}/Manager/PanelSystem.cs | 0 .../PanelSystem}/Manager/PanelSystem.cs.meta | 2 +- .../Runtime/{UIQueue => Tools/PanelSystem}/UITool.meta | 2 +- .../{UIQueue => Tools/PanelSystem}/UITool/UITool.cs | 0 .../{UIQueue => Tools/PanelSystem}/UITool/UITool.cs.meta | 2 +- Assets/00.StaryEvoTools/package.json | 2 +- 13 files changed, 8 insertions(+), 17 deletions(-) rename Assets/00.StaryEvoTools/Runtime/{UIQueue.meta => Tools/PanelSystem.meta} (77%) rename Assets/00.StaryEvoTools/Runtime/{UIQueue => Tools/PanelSystem}/Base.meta (77%) rename Assets/00.StaryEvoTools/Runtime/{UIQueue => Tools/PanelSystem}/Base/BasePanel.cs (100%) rename Assets/00.StaryEvoTools/Runtime/{UIQueue => Tools/PanelSystem}/Base/BasePanel.cs.meta (83%) rename Assets/00.StaryEvoTools/Runtime/{UIQueue => Tools/PanelSystem}/Manager.meta (77%) rename Assets/00.StaryEvoTools/Runtime/{UIQueue => Tools/PanelSystem}/Manager/PanelSystem.cs (100%) rename Assets/00.StaryEvoTools/Runtime/{UIQueue => Tools/PanelSystem}/Manager/PanelSystem.cs.meta (83%) rename Assets/00.StaryEvoTools/Runtime/{UIQueue => Tools/PanelSystem}/UITool.meta (77%) rename Assets/00.StaryEvoTools/Runtime/{UIQueue => Tools/PanelSystem}/UITool/UITool.cs (100%) rename Assets/00.StaryEvoTools/Runtime/{UIQueue => Tools/PanelSystem}/UITool/UITool.cs.meta (83%) diff --git a/Assets/00.StaryEvoTools/Runtime/HybridLoad/Fsm/ResStartState.cs b/Assets/00.StaryEvoTools/Runtime/HybridLoad/Fsm/ResStartState.cs index 2f909c4..481dc92 100644 --- a/Assets/00.StaryEvoTools/Runtime/HybridLoad/Fsm/ResStartState.cs +++ b/Assets/00.StaryEvoTools/Runtime/HybridLoad/Fsm/ResStartState.cs @@ -3,11 +3,9 @@ using System.IO; using Cysharp.Threading.Tasks; using Main; using Newtonsoft.Json; -using Stary.Evo.UIFarme; using UnityEditor; using UnityEngine; using UnityEngine.Assertions; -using UnityEngine.Networking; using YooAsset; using Object = UnityEngine.Object; diff --git a/Assets/00.StaryEvoTools/Runtime/PanelTools/ProgressBarPanel.cs b/Assets/00.StaryEvoTools/Runtime/PanelTools/ProgressBarPanel.cs index c0e7725..7dff52e 100644 --- a/Assets/00.StaryEvoTools/Runtime/PanelTools/ProgressBarPanel.cs +++ b/Assets/00.StaryEvoTools/Runtime/PanelTools/ProgressBarPanel.cs @@ -1,12 +1,5 @@ -using System; -using Cysharp.Threading.Tasks; -using Stary.Evo; -using Stary.Evo.AudioCore; -using Stary.Evo.InformationSave; -using Stary.Evo.UIFarme; using UnityEngine; using UnityEngine.UI; -using YooAsset; namespace Main { diff --git a/Assets/00.StaryEvoTools/Runtime/UIQueue.meta b/Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem.meta similarity index 77% rename from Assets/00.StaryEvoTools/Runtime/UIQueue.meta rename to Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem.meta index 2ea7d59..1f1ea2a 100644 --- a/Assets/00.StaryEvoTools/Runtime/UIQueue.meta +++ b/Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 837b1c9b253d1a64d95fca965f70a711 +guid: bd3da5461163cd64ab3441b4a74898b9 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/00.StaryEvoTools/Runtime/UIQueue/Base.meta b/Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem/Base.meta similarity index 77% rename from Assets/00.StaryEvoTools/Runtime/UIQueue/Base.meta rename to Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem/Base.meta index 75e6435..a3ca7a8 100644 --- a/Assets/00.StaryEvoTools/Runtime/UIQueue/Base.meta +++ b/Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem/Base.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: da2206dfe63228d4983a39725c0e940c +guid: 29ee4f712effada4496defa69962b37d folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/00.StaryEvoTools/Runtime/UIQueue/Base/BasePanel.cs b/Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem/Base/BasePanel.cs similarity index 100% rename from Assets/00.StaryEvoTools/Runtime/UIQueue/Base/BasePanel.cs rename to Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem/Base/BasePanel.cs diff --git a/Assets/00.StaryEvoTools/Runtime/UIQueue/Base/BasePanel.cs.meta b/Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem/Base/BasePanel.cs.meta similarity index 83% rename from Assets/00.StaryEvoTools/Runtime/UIQueue/Base/BasePanel.cs.meta rename to Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem/Base/BasePanel.cs.meta index 832f410..4689740 100644 --- a/Assets/00.StaryEvoTools/Runtime/UIQueue/Base/BasePanel.cs.meta +++ b/Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem/Base/BasePanel.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 5255d0f8bf44ff44c8ce65055fa5b28f +guid: 40f7e925262e7404ba3b4d8114a222b4 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/00.StaryEvoTools/Runtime/UIQueue/Manager.meta b/Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem/Manager.meta similarity index 77% rename from Assets/00.StaryEvoTools/Runtime/UIQueue/Manager.meta rename to Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem/Manager.meta index 8f42dcb..1a04ca0 100644 --- a/Assets/00.StaryEvoTools/Runtime/UIQueue/Manager.meta +++ b/Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem/Manager.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 0a3652d3c1fe0e54c8d3253df95b811b +guid: ac2b1730cea60f24f9a45eb29d21306b folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/00.StaryEvoTools/Runtime/UIQueue/Manager/PanelSystem.cs b/Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem/Manager/PanelSystem.cs similarity index 100% rename from Assets/00.StaryEvoTools/Runtime/UIQueue/Manager/PanelSystem.cs rename to Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem/Manager/PanelSystem.cs diff --git a/Assets/00.StaryEvoTools/Runtime/UIQueue/Manager/PanelSystem.cs.meta b/Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem/Manager/PanelSystem.cs.meta similarity index 83% rename from Assets/00.StaryEvoTools/Runtime/UIQueue/Manager/PanelSystem.cs.meta rename to Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem/Manager/PanelSystem.cs.meta index 95ab5da..59a0322 100644 --- a/Assets/00.StaryEvoTools/Runtime/UIQueue/Manager/PanelSystem.cs.meta +++ b/Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem/Manager/PanelSystem.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: dd370aabf636e1747a77b8071d92de0a +guid: fe94e5095f79a6e43b88b79996bb6907 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/00.StaryEvoTools/Runtime/UIQueue/UITool.meta b/Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem/UITool.meta similarity index 77% rename from Assets/00.StaryEvoTools/Runtime/UIQueue/UITool.meta rename to Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem/UITool.meta index 2b14319..536ec8b 100644 --- a/Assets/00.StaryEvoTools/Runtime/UIQueue/UITool.meta +++ b/Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem/UITool.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ee00776e2fe511d418a91053db3d27fa +guid: b02fa06ef99a409438a3210be9148e0f folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/00.StaryEvoTools/Runtime/UIQueue/UITool/UITool.cs b/Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem/UITool/UITool.cs similarity index 100% rename from Assets/00.StaryEvoTools/Runtime/UIQueue/UITool/UITool.cs rename to Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem/UITool/UITool.cs diff --git a/Assets/00.StaryEvoTools/Runtime/UIQueue/UITool/UITool.cs.meta b/Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem/UITool/UITool.cs.meta similarity index 83% rename from Assets/00.StaryEvoTools/Runtime/UIQueue/UITool/UITool.cs.meta rename to Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem/UITool/UITool.cs.meta index db9a84c..dc948d1 100644 --- a/Assets/00.StaryEvoTools/Runtime/UIQueue/UITool/UITool.cs.meta +++ b/Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem/UITool/UITool.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 47109d36e16c5ff49b9d9c535cce542f +guid: daa3b3944e8c712488cb711a0f3f092b MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/00.StaryEvoTools/package.json b/Assets/00.StaryEvoTools/package.json index 7b25621..821352e 100644 --- a/Assets/00.StaryEvoTools/package.json +++ b/Assets/00.StaryEvoTools/package.json @@ -1,6 +1,6 @@ { "name": "com.staryevo.tools", - "version": "1.1.1", + "version": "1.1.2", "displayName": "00.StaryEvo.Tools", "description": "This is an Framework package(后台服务器版本,端口9527)", "unity": "2021.3", From 4933c99c076b2678a18615335f75d9cee6bec197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E9=93=AE?= <834207172@qq.com> Date: Tue, 14 Oct 2025 14:29:08 +0800 Subject: [PATCH 9/9] 111 --- .../Tools/PanelSystem/Base/BasePanel.cs | 72 +++++++++++++++---- .../Tools/PanelSystem/Manager/PanelSystem.cs | 6 ++ .../Runtime/VideoSystemPanel/VideoPanel.cs | 6 +- Assets/00.StaryEvoTools/package.json | 2 +- 4 files changed, 69 insertions(+), 17 deletions(-) diff --git a/Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem/Base/BasePanel.cs b/Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem/Base/BasePanel.cs index 3f22a7f..f8a0ff0 100644 --- a/Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem/Base/BasePanel.cs +++ b/Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem/Base/BasePanel.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Threading.Tasks; using DG.Tweening; using UnityEngine; @@ -6,6 +7,7 @@ using UnityEngine.UI; #if HotUpdate using YooAsset; #endif + namespace Stary.Evo.UIFarme { public interface IBasePanel : IController @@ -14,6 +16,7 @@ namespace Stary.Evo.UIFarme /// UI信息 /// string UIName { get; set; } + /// /// 绑定这个面板的实例 /// @@ -28,7 +31,7 @@ namespace Stary.Evo.UIFarme /// /// 虚方法,UI进入时执行的操作,只会执行一次 /// - void OnEnter(); + void OnEnter(Action complete = null); /// /// 虚方法,UI暂停时执行的操作,只会执行一次 @@ -74,6 +77,8 @@ namespace Stary.Evo.UIFarme /// public string UIName { get; set; } + public abstract UITweenType TweenType { get; } + /// /// 面板管理器 /// @@ -118,11 +123,27 @@ namespace Stary.Evo.UIFarme } - public virtual void OnEnter() + public virtual void OnEnter(Action complete = null) { activePanel.SetActive(true); canvasGroup.blocksRaycasts = true; - canvasGroup.DOFade(1f, 1f); + if (TweenType == UITweenType.Fade) + { + canvasGroup.alpha = 1f; + } + + if (TweenType == UITweenType.Fade) + { + canvasGroup.DOFade(1f, 2f).OnComplete(() => { complete?.Invoke(); }); + } + else if (TweenType == UITweenType.Yoyo) + { + canvasGroup.DOFade(1, 2f).SetLoops(2, LoopType.Yoyo).OnComplete(() => { complete?.Invoke(); }); + } + else + { + canvasGroup.DOFade(1, 2f).SetLoops(-1).OnComplete(() => { complete?.Invoke(); }); + } } public virtual void OnPause() @@ -169,15 +190,15 @@ namespace Stary.Evo.UIFarme } else { - var package = YooAssets.TryGetPackage(packageName); - if (package == null) - { - handle = YooAssets.LoadAssetAsync(panelName); - } - else - { - handle = package.LoadAssetAsync(panelName); - } + var package = YooAssets.TryGetPackage(packageName); + if (package == null) + { + handle = YooAssets.LoadAssetAsync(panelName); + } + else + { + handle = package.LoadAssetAsync(panelName); + } } await handle.Task; @@ -192,7 +213,7 @@ namespace Stary.Evo.UIFarme activePanel.name = this.GetType().Name; - if (!activePanel.GetComponentInChildren() && !activePanel.GetComponentInParent()) + if (!activePanel.GetComponentInChildren() && !activePanel.GetComponentInParent()) { Debug.LogError($"UnityEvo:panelParent上不存在Canvas组件,{panelName}无法正常运行,进程已中断,请检查!!!!!"); return null; @@ -236,5 +257,28 @@ namespace Stary.Evo.UIFarme { return PanelSystem.GetArchitecture(); } + + public enum UITweenType + { + /// + /// 无动画 + /// + None, + + /// + /// 淡入淡出 + /// + Fade, + + /// + /// 循环播放 + /// + Loop, + + /// + /// 往返播放 + /// + Yoyo, + } } } \ No newline at end of file diff --git a/Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem/Manager/PanelSystem.cs b/Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem/Manager/PanelSystem.cs index 0f41ac0..af0d02e 100644 --- a/Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem/Manager/PanelSystem.cs +++ b/Assets/00.StaryEvoTools/Runtime/Tools/PanelSystem/Manager/PanelSystem.cs @@ -22,6 +22,7 @@ namespace Stary.Evo.UIFarme /// void PopQueue(string panelName=null) where T : IBasePanel, new(); + void PopQueue(T t, string panelName=null) where T : IBasePanel, new(); /// /// 执行面板的出栈操作,此操作会执行面板的OnExit方法 /// @@ -203,6 +204,11 @@ namespace Stary.Evo.UIFarme } } + public void PopQueue(T t, string panelName = null) where T : IBasePanel, new() + { + PopQueue(panelName); + } + public void PopStack() { if (stackPanel.Count > 0) diff --git a/Assets/00.StaryEvoTools/Runtime/VideoSystemPanel/VideoPanel.cs b/Assets/00.StaryEvoTools/Runtime/VideoSystemPanel/VideoPanel.cs index b6fcf38..35ceb45 100644 --- a/Assets/00.StaryEvoTools/Runtime/VideoSystemPanel/VideoPanel.cs +++ b/Assets/00.StaryEvoTools/Runtime/VideoSystemPanel/VideoPanel.cs @@ -31,6 +31,8 @@ public class VideoPanel : BasePanel } + public override UITweenType TweenType => UITweenType.Fade; + public override void Initialize(GameObject panelGo) { base.Initialize(panelGo); @@ -43,9 +45,9 @@ public class VideoPanel : BasePanel _animator = area.GetComponentInChildren(); } - public override void OnEnter() + public override void OnEnter(Action complete = null) { - base.OnEnter(); + base.OnEnter(complete); this.RegisterEvent(ModeType.VideoStart, OnStartMove); this.RegisterEvent(ModeType.VideoEnd, OnStopMove); diff --git a/Assets/00.StaryEvoTools/package.json b/Assets/00.StaryEvoTools/package.json index 821352e..cad4710 100644 --- a/Assets/00.StaryEvoTools/package.json +++ b/Assets/00.StaryEvoTools/package.json @@ -1,6 +1,6 @@ { "name": "com.staryevo.tools", - "version": "1.1.2", + "version": "1.1.3", "displayName": "00.StaryEvo.Tools", "description": "This is an Framework package(后台服务器版本,端口9527)", "unity": "2021.3",