From 4fa811b88895aa546c630f2a9209ee78358d40db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E9=93=AE?= <834207172@qq.com> Date: Fri, 11 Apr 2025 15:49:43 +0800 Subject: [PATCH 01/13] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/00.StaryEvo/Editor/MarkAdressable/MarkAdressable.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Assets/00.StaryEvo/Editor/MarkAdressable/MarkAdressable.cs b/Assets/00.StaryEvo/Editor/MarkAdressable/MarkAdressable.cs index d57970c..004ffac 100644 --- a/Assets/00.StaryEvo/Editor/MarkAdressable/MarkAdressable.cs +++ b/Assets/00.StaryEvo/Editor/MarkAdressable/MarkAdressable.cs @@ -134,6 +134,7 @@ namespace Stary.Evo.Editor //copydll + if(!BuildAssetWindow.GetBuildPackageName().Equals("Main")) AddHotfixAddressableDll(); //清空用户旧数据 From 5c9bc5641ad09d0fca1884b2044d01c7458a505b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E9=93=AE?= <834207172@qq.com> Date: Fri, 11 Apr 2025 15:53:34 +0800 Subject: [PATCH 02/13] =?UTF-8?q?=E5=8D=87=E7=BA=A700?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/00.StaryEvo/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/00.StaryEvo/package.json b/Assets/00.StaryEvo/package.json index 4cd4aca..ac0d046 100644 --- a/Assets/00.StaryEvo/package.json +++ b/Assets/00.StaryEvo/package.json @@ -1,6 +1,6 @@ { "name": "com.staryevo.main", - "version": "1.0.6", + "version": "1.0.7", "displayName": "00.StaryEvo", "description": "This is an Framework package", "unity": "2021.3", From dd01496c48be441f7884972c68430595368b27fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E9=93=AE?= <834207172@qq.com> Date: Mon, 14 Apr 2025 10:07:18 +0800 Subject: [PATCH 03/13] =?UTF-8?q?=E4=BF=AE=E6=94=B900=20=E6=A1=86=E6=9E=B6?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Runtime/Utility/FSM/DefaultState.cs | 37 ++++++++++++++ .../Runtime/Utility/FSM/DefaultState.cs.meta | 3 ++ .../Runtime/Utility/FSM/FSMIState.cs | 18 +++++-- .../Runtime/Utility/FSM/FSMISystem.cs | 48 ++++++++++++++++++- Assets/00.StaryEvo/package.json | 2 +- 5 files changed, 102 insertions(+), 6 deletions(-) create mode 100644 Assets/00.StaryEvo/Runtime/Utility/FSM/DefaultState.cs create mode 100644 Assets/00.StaryEvo/Runtime/Utility/FSM/DefaultState.cs.meta diff --git a/Assets/00.StaryEvo/Runtime/Utility/FSM/DefaultState.cs b/Assets/00.StaryEvo/Runtime/Utility/FSM/DefaultState.cs new file mode 100644 index 0000000..5b0969d --- /dev/null +++ b/Assets/00.StaryEvo/Runtime/Utility/FSM/DefaultState.cs @@ -0,0 +1,37 @@ +using Cysharp.Threading.Tasks; + +namespace Stary.Evo +{ + public class DefaultState : AbstractFSMIState + { + public DefaultState(IFsmSystem system) : base(system) + { + + } + + public override void OnEnter() + { + + } + + public override void OnExit() + { + + } + + public override UniTask OnExitAsync() + { + return UniTask.CompletedTask; + } + + public override UniTask OnEnterAsync(T param) + { + return UniTask.CompletedTask; + } + + public override UniTask OnEnterAsync(T1 param1, T2 param2) + { + return UniTask.CompletedTask; + } + } +} \ No newline at end of file diff --git a/Assets/00.StaryEvo/Runtime/Utility/FSM/DefaultState.cs.meta b/Assets/00.StaryEvo/Runtime/Utility/FSM/DefaultState.cs.meta new file mode 100644 index 0000000..7cc26fd --- /dev/null +++ b/Assets/00.StaryEvo/Runtime/Utility/FSM/DefaultState.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: fa9b0b9ba7a849f597744565a49bd61a +timeCreated: 1744547550 \ No newline at end of file diff --git a/Assets/00.StaryEvo/Runtime/Utility/FSM/FSMIState.cs b/Assets/00.StaryEvo/Runtime/Utility/FSM/FSMIState.cs index fbb9233..46fd737 100644 --- a/Assets/00.StaryEvo/Runtime/Utility/FSM/FSMIState.cs +++ b/Assets/00.StaryEvo/Runtime/Utility/FSM/FSMIState.cs @@ -1,4 +1,5 @@ using System; +using Cysharp.Threading.Tasks; using UnityEngine; namespace Stary.Evo @@ -6,20 +7,25 @@ namespace Stary.Evo public interface FSMIState { IFsmSystem FsmSystem { get; } string Name { get; } - float Timer { get; set; } + //进入该状态时调用 void OnEnter(); + + UniTask OnEnterAsync(T param); + + UniTask OnEnterAsync(T1 param1, T2 param2); //每帧调用 void OnUpdate(); //退出该状态时调用 void OnExit(); + + UniTask OnExitAsync(); } public abstract class AbstractFSMIState : FSMIState { public IFsmSystem FsmSystem { get; } public string Name { get; } - public abstract float Timer { get; set; } public AbstractFSMIState(IFsmSystem system) { @@ -27,13 +33,17 @@ namespace Stary.Evo Name = GetType().Name; } - public abstract void OnEnter(); + public abstract UniTask OnEnterAsync(T param); + public abstract UniTask OnEnterAsync(T1 param1, T2 param2); + public abstract void OnEnter(); public virtual void OnUpdate() { - Timer += Time.deltaTime; + // Timer += Time.deltaTime; } public abstract void OnExit(); + + public abstract UniTask OnExitAsync(); } } diff --git a/Assets/00.StaryEvo/Runtime/Utility/FSM/FSMISystem.cs b/Assets/00.StaryEvo/Runtime/Utility/FSM/FSMISystem.cs index d1dee9b..90d3704 100644 --- a/Assets/00.StaryEvo/Runtime/Utility/FSM/FSMISystem.cs +++ b/Assets/00.StaryEvo/Runtime/Utility/FSM/FSMISystem.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using Cysharp.Threading.Tasks; using UnityEngine; namespace Stary.Evo @@ -9,6 +10,8 @@ namespace Stary.Evo void AddState(FSMIState state); void RemoveState(FSMIState state); void SetCurState(string name); + UniTask SetCurState(string name, T param); + UniTask SetCurState(string name, T1 param1, T2 param2); FSMIState GetStateWithName(string name); HashMap States { get; set; } } @@ -21,6 +24,7 @@ namespace Stary.Evo public FsmSystem() { States = new HashMap(); + AddState(new DefaultState(this)); } public void AddState(FSMIState state) @@ -48,15 +52,57 @@ namespace Stary.Evo } } + /// + /// 普通状态切换,适用于无参 + /// + /// public void SetCurState(string name) { if (CurState != null) - CurState.OnExit(); + CurState.OnExitAsync(); FSMIState state = GetStateWithName(name); CurState = state; CurState.OnEnter(); } + /// + /// 异步状态切换,适用于有参 + /// + /// + /// + /// + public async UniTask SetCurState(string name, T param) + { + if (CurState != null) + { + await CurState.OnExitAsync(); + } + + FSMIState state = GetStateWithName(name); + CurState = state; + await CurState.OnEnterAsync(param); + } + + /// + /// 异步状态切换,适用于有参 + /// + /// + /// + /// + /// + /// + public async UniTask SetCurState(string name, T1 param1, T2 param2) + { + if (CurState != null) + { + await CurState.OnExitAsync(); + } + + FSMIState state = GetStateWithName(name); + CurState = state; + await CurState.OnEnterAsync(param1, param2); + } + public FSMIState GetStateWithName(string name) { if (States.ContainsKey(name)) diff --git a/Assets/00.StaryEvo/package.json b/Assets/00.StaryEvo/package.json index ac0d046..6109101 100644 --- a/Assets/00.StaryEvo/package.json +++ b/Assets/00.StaryEvo/package.json @@ -1,6 +1,6 @@ { "name": "com.staryevo.main", - "version": "1.0.7", + "version": "1.0.8", "displayName": "00.StaryEvo", "description": "This is an Framework package", "unity": "2021.3", From 0e657df04a28ff1bfd24854e5e4b42ad3109e650 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E9=93=AE?= <834207172@qq.com> Date: Mon, 14 Apr 2025 12:04:00 +0800 Subject: [PATCH 04/13] =?UTF-8?q?=E6=96=B0=E5=A2=9EdomainAll?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Runtime/PlayerSettings/MainDomainAll.cs | 15 +++++++++++++++ .../Runtime/PlayerSettings/MainDomainAll.cs.meta | 3 +++ Assets/00.StaryEvo/package.json | 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 Assets/00.StaryEvo/Runtime/PlayerSettings/MainDomainAll.cs create mode 100644 Assets/00.StaryEvo/Runtime/PlayerSettings/MainDomainAll.cs.meta diff --git a/Assets/00.StaryEvo/Runtime/PlayerSettings/MainDomainAll.cs b/Assets/00.StaryEvo/Runtime/PlayerSettings/MainDomainAll.cs new file mode 100644 index 0000000..1deab4b --- /dev/null +++ b/Assets/00.StaryEvo/Runtime/PlayerSettings/MainDomainAll.cs @@ -0,0 +1,15 @@ +using System; +using UnityEngine; +using UnityEngine.Serialization; + +namespace Stary.Evo +{ + + + [CreateAssetMenu(fileName = "MainDomainAll", menuName = "Evo/Create MainDomainAll")] + public class MainDomainAll : ScriptableObject + { + public string[] domainAll; + } + +} \ No newline at end of file diff --git a/Assets/00.StaryEvo/Runtime/PlayerSettings/MainDomainAll.cs.meta b/Assets/00.StaryEvo/Runtime/PlayerSettings/MainDomainAll.cs.meta new file mode 100644 index 0000000..89a39ba --- /dev/null +++ b/Assets/00.StaryEvo/Runtime/PlayerSettings/MainDomainAll.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 2745f06c743a4d8aaf3d993312e39f02 +timeCreated: 1744603367 \ No newline at end of file diff --git a/Assets/00.StaryEvo/package.json b/Assets/00.StaryEvo/package.json index 6109101..a47f358 100644 --- a/Assets/00.StaryEvo/package.json +++ b/Assets/00.StaryEvo/package.json @@ -1,6 +1,6 @@ { "name": "com.staryevo.main", - "version": "1.0.8", + "version": "1.0.9", "displayName": "00.StaryEvo", "description": "This is an Framework package", "unity": "2021.3", From c0b38b6524b23b63638d976f9ceb3b5c2768e1a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E9=93=AE?= <834207172@qq.com> Date: Mon, 14 Apr 2025 12:18:19 +0800 Subject: [PATCH 05/13] =?UTF-8?q?=E6=96=B0=E5=A2=9Edomain=E6=B3=A8?= =?UTF-8?q?=E5=86=8C=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/00.StaryEvo/Editor/Build.meta | 3 ++ .../00.StaryEvo/Editor/Build/BuildReport.cs | 36 +++++++++++++++++++ .../Editor/Build/BuildReport.cs.meta | 3 ++ Assets/00.StaryEvo/package.json | 2 +- 4 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 Assets/00.StaryEvo/Editor/Build.meta create mode 100644 Assets/00.StaryEvo/Editor/Build/BuildReport.cs create mode 100644 Assets/00.StaryEvo/Editor/Build/BuildReport.cs.meta diff --git a/Assets/00.StaryEvo/Editor/Build.meta b/Assets/00.StaryEvo/Editor/Build.meta new file mode 100644 index 0000000..76ca8f6 --- /dev/null +++ b/Assets/00.StaryEvo/Editor/Build.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 357613ee582c4e068ea5e61e4f6499e4 +timeCreated: 1744603673 \ No newline at end of file diff --git a/Assets/00.StaryEvo/Editor/Build/BuildReport.cs b/Assets/00.StaryEvo/Editor/Build/BuildReport.cs new file mode 100644 index 0000000..8c61b4a --- /dev/null +++ b/Assets/00.StaryEvo/Editor/Build/BuildReport.cs @@ -0,0 +1,36 @@ +using System.Collections.Generic; +using Stary.Evo.Editor; +using UnityEditor; +using UnityEditor.Build; +using UnityEditor.Callbacks; + +namespace Stary.Evo +{ +// 实现接口的方式 + public class BuildReport : IPostprocessBuildWithReport, IPreprocessBuildWithReport + { + public int callbackOrder { get; set; } + + public void OnPreprocessBuild(UnityEditor.Build.Reporting.BuildReport report) + { + // build前 + var domainAll = CreatAssetWindow.GetCreatDomainAll(); + List domainNames = new List(); + for (int i = 0; i < domainAll.Count; i++) + { + if (domainAll[i].DomainName != "Main") + domainNames.Add(domainAll[i].DomainName); + } + string configPath = $"Assets/Main/Resources/MainDomainAll.asset"; + MainDomainAll mainDomainAll = + AssetDatabase.LoadAssetAtPath(configPath); + mainDomainAll.domainAll = domainNames.ToArray(); + AssetDatabase.SaveAssets(); + } + + public void OnPostprocessBuild(UnityEditor.Build.Reporting.BuildReport report) + { + // build完成后 + } + } +} \ No newline at end of file diff --git a/Assets/00.StaryEvo/Editor/Build/BuildReport.cs.meta b/Assets/00.StaryEvo/Editor/Build/BuildReport.cs.meta new file mode 100644 index 0000000..e82da54 --- /dev/null +++ b/Assets/00.StaryEvo/Editor/Build/BuildReport.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a96d44b788304391b0e9ba8ff6a7bcc9 +timeCreated: 1744603665 \ No newline at end of file diff --git a/Assets/00.StaryEvo/package.json b/Assets/00.StaryEvo/package.json index a47f358..e384c98 100644 --- a/Assets/00.StaryEvo/package.json +++ b/Assets/00.StaryEvo/package.json @@ -1,6 +1,6 @@ { "name": "com.staryevo.main", - "version": "1.0.9", + "version": "1.0.10", "displayName": "00.StaryEvo", "description": "This is an Framework package", "unity": "2021.3", From 902c7b1c5f783c7db2132bb7ddbbd0f80585a0f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E9=93=AE?= <834207172@qq.com> Date: Mon, 14 Apr 2025 14:40:32 +0800 Subject: [PATCH 06/13] =?UTF-8?q?00=201.0.11=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../00.StaryEvo/Editor/Build/BuildReport.cs | 13 +----- Assets/00.StaryEvo/Editor/PlayerSettings.meta | 3 ++ .../PlayerSettings/MainDomainAllEditor.cs | 40 +++++++++++++++++++ .../MainDomainAllEditor.cs.meta | 3 ++ .../Runtime/PlayerSettings/MainDomainAll.cs | 18 +++++++-- 5 files changed, 61 insertions(+), 16 deletions(-) create mode 100644 Assets/00.StaryEvo/Editor/PlayerSettings.meta create mode 100644 Assets/00.StaryEvo/Editor/PlayerSettings/MainDomainAllEditor.cs create mode 100644 Assets/00.StaryEvo/Editor/PlayerSettings/MainDomainAllEditor.cs.meta diff --git a/Assets/00.StaryEvo/Editor/Build/BuildReport.cs b/Assets/00.StaryEvo/Editor/Build/BuildReport.cs index 8c61b4a..71d1524 100644 --- a/Assets/00.StaryEvo/Editor/Build/BuildReport.cs +++ b/Assets/00.StaryEvo/Editor/Build/BuildReport.cs @@ -14,18 +14,7 @@ namespace Stary.Evo public void OnPreprocessBuild(UnityEditor.Build.Reporting.BuildReport report) { // build前 - var domainAll = CreatAssetWindow.GetCreatDomainAll(); - List domainNames = new List(); - for (int i = 0; i < domainAll.Count; i++) - { - if (domainAll[i].DomainName != "Main") - domainNames.Add(domainAll[i].DomainName); - } - string configPath = $"Assets/Main/Resources/MainDomainAll.asset"; - MainDomainAll mainDomainAll = - AssetDatabase.LoadAssetAtPath(configPath); - mainDomainAll.domainAll = domainNames.ToArray(); - AssetDatabase.SaveAssets(); + } public void OnPostprocessBuild(UnityEditor.Build.Reporting.BuildReport report) diff --git a/Assets/00.StaryEvo/Editor/PlayerSettings.meta b/Assets/00.StaryEvo/Editor/PlayerSettings.meta new file mode 100644 index 0000000..017004c --- /dev/null +++ b/Assets/00.StaryEvo/Editor/PlayerSettings.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: f1b6f2585f9e4815aa16759ec152b390 +timeCreated: 1744611618 \ No newline at end of file diff --git a/Assets/00.StaryEvo/Editor/PlayerSettings/MainDomainAllEditor.cs b/Assets/00.StaryEvo/Editor/PlayerSettings/MainDomainAllEditor.cs new file mode 100644 index 0000000..0dd1e5a --- /dev/null +++ b/Assets/00.StaryEvo/Editor/PlayerSettings/MainDomainAllEditor.cs @@ -0,0 +1,40 @@ +using System.Collections.Generic; +using Stary.Evo.Editor; +using UnityEditor; +using UnityEngine; + +namespace Stary.Evo +{ + [CustomEditor(typeof(MainDomainAll))] + public class MainDomainAllEditor : UnityEditor.Editor + { + public override void OnInspectorGUI() + { + base.OnInspectorGUI(); + if (GUILayout.Button("生成点位集合数据")) + { + var domainAll = CreatAssetWindow.GetCreatDomainAll(); + List videoDomainEntities = new List(); + for (int i = 0; i < domainAll.Count; i++) + { + if (domainAll[i].DomainName != "Main") + videoDomainEntities.Add(new VideoDomainEntity() + { + domainName = domainAll[i].DomainName, + }); + } + + // string configPath = $"Assets/Main/Resources/MainDomainAll.asset"; + // MainDomainAll targetComponent = + // AssetDatabase.LoadAssetAtPath(configPath); + var targetComponent = target as MainDomainAll; + if (targetComponent != null) + { + targetComponent.domainAll = videoDomainEntities.ToArray(); + } + EditorUtility.SetDirty(targetComponent); + AssetDatabase.SaveAssets(); + } + } + } +} \ No newline at end of file diff --git a/Assets/00.StaryEvo/Editor/PlayerSettings/MainDomainAllEditor.cs.meta b/Assets/00.StaryEvo/Editor/PlayerSettings/MainDomainAllEditor.cs.meta new file mode 100644 index 0000000..50eb188 --- /dev/null +++ b/Assets/00.StaryEvo/Editor/PlayerSettings/MainDomainAllEditor.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a9f7b7d280094f2e8f6aed8be7314b75 +timeCreated: 1744611639 \ No newline at end of file diff --git a/Assets/00.StaryEvo/Runtime/PlayerSettings/MainDomainAll.cs b/Assets/00.StaryEvo/Runtime/PlayerSettings/MainDomainAll.cs index 1deab4b..22fb15e 100644 --- a/Assets/00.StaryEvo/Runtime/PlayerSettings/MainDomainAll.cs +++ b/Assets/00.StaryEvo/Runtime/PlayerSettings/MainDomainAll.cs @@ -1,15 +1,25 @@ using System; +using System.Collections.Generic; +using Sirenix.OdinInspector; +using UnityEditor; using UnityEngine; using UnityEngine.Serialization; namespace Stary.Evo { - - [CreateAssetMenu(fileName = "MainDomainAll", menuName = "Evo/Create MainDomainAll")] public class MainDomainAll : ScriptableObject { - public string[] domainAll; - } + public VideoDomainEntity[] domainAll; + + + } + [Serializable] + public struct VideoDomainEntity + { + public bool isVideo; + public string domainName; + + } } \ No newline at end of file From a9182142e91fd2fbca32892be7549b445dbed812 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E9=93=AE?= <834207172@qq.com> Date: Mon, 14 Apr 2025 14:41:40 +0800 Subject: [PATCH 07/13] =?UTF-8?q?00=201.0.11=20=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/00.StaryEvo/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/00.StaryEvo/package.json b/Assets/00.StaryEvo/package.json index e384c98..e6a2d3e 100644 --- a/Assets/00.StaryEvo/package.json +++ b/Assets/00.StaryEvo/package.json @@ -1,6 +1,6 @@ { "name": "com.staryevo.main", - "version": "1.0.10", + "version": "1.0.11", "displayName": "00.StaryEvo", "description": "This is an Framework package", "unity": "2021.3", From 83fc373e686fee22ae85bfd48ee063ca9fc06174 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E9=93=AE?= <834207172@qq.com> Date: Mon, 14 Apr 2025 15:11:41 +0800 Subject: [PATCH 08/13] =?UTF-8?q?05=20=E5=88=A0=E9=99=A4=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/05.TableTextConversion/RunTime/Test.cs | 34 ------------------- .../RunTime/Test.cs.meta | 11 ------ Assets/05.TableTextConversion/package.json | 2 +- 3 files changed, 1 insertion(+), 46 deletions(-) delete mode 100644 Assets/05.TableTextConversion/RunTime/Test.cs delete mode 100644 Assets/05.TableTextConversion/RunTime/Test.cs.meta diff --git a/Assets/05.TableTextConversion/RunTime/Test.cs b/Assets/05.TableTextConversion/RunTime/Test.cs deleted file mode 100644 index 203c8d4..0000000 --- a/Assets/05.TableTextConversion/RunTime/Test.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Threading.Tasks; -using UnityEngine; -using Stary.Evo.TableTextConversion; - -public class Test : MonoBehaviour -{ - // Start is called before the first frame update - /*async void Start() - { - Task audioTableData = ReadDumpInformation.Read(); - await audioTableData; - AudioTableData data = audioTableData.Result; - if (data != null) - { - Debug.Log($"UnityEvo:{data.infos[3].name}"); - } - }*/ - void Start() - { - AudioTableData audioTableData = ReadDumpInformation.ReadInEditor(); - if (audioTableData != null) - { - Debug.Log($"UnityEvo:{audioTableData.infos[3].name}"); - } - } - - // Update is called once per frame - void Update() - { - - } -} diff --git a/Assets/05.TableTextConversion/RunTime/Test.cs.meta b/Assets/05.TableTextConversion/RunTime/Test.cs.meta deleted file mode 100644 index 7ac4987..0000000 --- a/Assets/05.TableTextConversion/RunTime/Test.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5cc8857da4ee2534289add72195af962 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/05.TableTextConversion/package.json b/Assets/05.TableTextConversion/package.json index 08cefc8..0c8ea52 100644 --- a/Assets/05.TableTextConversion/package.json +++ b/Assets/05.TableTextConversion/package.json @@ -1,6 +1,6 @@ { "name": "com.staryevo.tabletextconversion", - "version": "1.0.2", + "version": "1.0.3", "displayName": "05.TableTextConversion", "description": "表格转化工具", "unity": "2021.3", From 7c6a6dcd750114a1ea4724bcfda8f4ad9d5dd7af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E9=93=AE?= <834207172@qq.com> Date: Mon, 14 Apr 2025 15:43:40 +0800 Subject: [PATCH 09/13] =?UTF-8?q?05=20=E6=9B=B4=E6=96=B0=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Editor/TableTextConversion.Editor.asmdef | 6 ++++-- Assets/05.TableTextConversion/package.json | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Assets/05.TableTextConversion/Editor/TableTextConversion.Editor.asmdef b/Assets/05.TableTextConversion/Editor/TableTextConversion.Editor.asmdef index 2f2f58c..b87aaf3 100644 --- a/Assets/05.TableTextConversion/Editor/TableTextConversion.Editor.asmdef +++ b/Assets/05.TableTextConversion/Editor/TableTextConversion.Editor.asmdef @@ -2,9 +2,11 @@ "name": "TableTextConversion.Editor", "rootNamespace": "", "references": [ - "GUID:66fdc96a271fc954e9da30c76a486d9c" + "TableTextConversion.RunTime" + ], + "includePlatforms": [ + "Editor" ], - "includePlatforms": [], "excludePlatforms": [], "allowUnsafeCode": false, "overrideReferences": false, diff --git a/Assets/05.TableTextConversion/package.json b/Assets/05.TableTextConversion/package.json index 0c8ea52..f6f963b 100644 --- a/Assets/05.TableTextConversion/package.json +++ b/Assets/05.TableTextConversion/package.json @@ -1,6 +1,6 @@ { "name": "com.staryevo.tabletextconversion", - "version": "1.0.3", + "version": "1.0.4", "displayName": "05.TableTextConversion", "description": "表格转化工具", "unity": "2021.3", From c03e963dcc1d184490c7d2a569476724b7057d95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E9=93=AE?= <834207172@qq.com> Date: Tue, 15 Apr 2025 10:23:17 +0800 Subject: [PATCH 10/13] =?UTF-8?q?fsm=E7=8A=B6=E6=80=81=E6=9C=BA=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Runtime/Utility/FSM/DefaultState.cs | 16 +++++----------- .../00.StaryEvo/Runtime/Utility/FSM/FSMIState.cs | 7 +++---- .../Runtime/Utility/FSM/FSMISystem.cs | 8 ++++---- Assets/00.StaryEvo/package.json | 2 +- 4 files changed, 13 insertions(+), 20 deletions(-) diff --git a/Assets/00.StaryEvo/Runtime/Utility/FSM/DefaultState.cs b/Assets/00.StaryEvo/Runtime/Utility/FSM/DefaultState.cs index 5b0969d..b29feb7 100644 --- a/Assets/00.StaryEvo/Runtime/Utility/FSM/DefaultState.cs +++ b/Assets/00.StaryEvo/Runtime/Utility/FSM/DefaultState.cs @@ -8,22 +8,16 @@ namespace Stary.Evo { } - - public override void OnEnter() - { - - } - - public override void OnExit() - { - - } - public override UniTask OnExitAsync() { return UniTask.CompletedTask; } + public override UniTask OnEnterAsync() + { + return UniTask.CompletedTask; + } + public override UniTask OnEnterAsync(T param) { return UniTask.CompletedTask; diff --git a/Assets/00.StaryEvo/Runtime/Utility/FSM/FSMIState.cs b/Assets/00.StaryEvo/Runtime/Utility/FSM/FSMIState.cs index 46fd737..7746654 100644 --- a/Assets/00.StaryEvo/Runtime/Utility/FSM/FSMIState.cs +++ b/Assets/00.StaryEvo/Runtime/Utility/FSM/FSMIState.cs @@ -9,7 +9,7 @@ namespace Stary.Evo string Name { get; } //进入该状态时调用 - void OnEnter(); + UniTask OnEnterAsync(); UniTask OnEnterAsync(T param); @@ -17,7 +17,6 @@ namespace Stary.Evo //每帧调用 void OnUpdate(); //退出该状态时调用 - void OnExit(); UniTask OnExitAsync(); } @@ -36,13 +35,13 @@ namespace Stary.Evo public abstract UniTask OnEnterAsync(T param); public abstract UniTask OnEnterAsync(T1 param1, T2 param2); - public abstract void OnEnter(); + public abstract UniTask OnEnterAsync(); public virtual void OnUpdate() { // Timer += Time.deltaTime; } - public abstract void OnExit(); + public abstract UniTask OnExitAsync(); } diff --git a/Assets/00.StaryEvo/Runtime/Utility/FSM/FSMISystem.cs b/Assets/00.StaryEvo/Runtime/Utility/FSM/FSMISystem.cs index 90d3704..3ada609 100644 --- a/Assets/00.StaryEvo/Runtime/Utility/FSM/FSMISystem.cs +++ b/Assets/00.StaryEvo/Runtime/Utility/FSM/FSMISystem.cs @@ -9,7 +9,7 @@ namespace Stary.Evo FSMIState CurState { get; set; } void AddState(FSMIState state); void RemoveState(FSMIState state); - void SetCurState(string name); + UniTask SetCurState(string name); UniTask SetCurState(string name, T param); UniTask SetCurState(string name, T1 param1, T2 param2); FSMIState GetStateWithName(string name); @@ -56,13 +56,13 @@ namespace Stary.Evo /// 普通状态切换,适用于无参 /// /// - public void SetCurState(string name) + public async UniTask SetCurState(string name) { if (CurState != null) - CurState.OnExitAsync(); + await CurState.OnExitAsync(); FSMIState state = GetStateWithName(name); CurState = state; - CurState.OnEnter(); + CurState.OnEnterAsync(); } /// diff --git a/Assets/00.StaryEvo/package.json b/Assets/00.StaryEvo/package.json index e6a2d3e..5821f89 100644 --- a/Assets/00.StaryEvo/package.json +++ b/Assets/00.StaryEvo/package.json @@ -1,6 +1,6 @@ { "name": "com.staryevo.main", - "version": "1.0.11", + "version": "1.0.12", "displayName": "00.StaryEvo", "description": "This is an Framework package", "unity": "2021.3", From 779435c06238cafb82897e39d0f370aab515b99d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E9=93=AE?= <834207172@qq.com> Date: Tue, 15 Apr 2025 17:06:01 +0800 Subject: [PATCH 11/13] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E5=B1=82=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Editor/BuildAsset/CreatAssetWindow.cs | 10 ++ .../Editor/com.stary.evo.editor.asmdef | 3 +- Assets/00.StaryEvo/package.json | 5 +- Assets/07.RKVoiceCommand/Editor.meta | 8 -- Assets/07.RKVoiceCommand/README.md | 1 - Assets/07.RKVoiceCommand/README.md.meta | 7 -- Assets/07.RKVoiceCommand/RunTime.meta | 8 -- .../RunTime/IVoiceCommandSystem.cs | 64 ----------- .../RunTime/IVoiceCommandSystem.cs.meta | 11 -- .../RunTime/RKVoiceCommand.RunTime.asmdef | 18 --- .../RKVoiceCommand.RunTime.asmdef.meta | 13 --- .../RunTime/VoiceCommandController.cs | 104 ------------------ .../RunTime/VoiceCommandController.cs.meta | 11 -- Assets/07.RKVoiceCommand/package.json | 20 ---- Assets/07.RKVoiceCommand/package.json.meta | 7 -- 15 files changed, 15 insertions(+), 275 deletions(-) delete mode 100644 Assets/07.RKVoiceCommand/Editor.meta delete mode 100644 Assets/07.RKVoiceCommand/README.md delete mode 100644 Assets/07.RKVoiceCommand/README.md.meta delete mode 100644 Assets/07.RKVoiceCommand/RunTime.meta delete mode 100644 Assets/07.RKVoiceCommand/RunTime/IVoiceCommandSystem.cs delete mode 100644 Assets/07.RKVoiceCommand/RunTime/IVoiceCommandSystem.cs.meta delete mode 100644 Assets/07.RKVoiceCommand/RunTime/RKVoiceCommand.RunTime.asmdef delete mode 100644 Assets/07.RKVoiceCommand/RunTime/RKVoiceCommand.RunTime.asmdef.meta delete mode 100644 Assets/07.RKVoiceCommand/RunTime/VoiceCommandController.cs delete mode 100644 Assets/07.RKVoiceCommand/RunTime/VoiceCommandController.cs.meta delete mode 100644 Assets/07.RKVoiceCommand/package.json delete mode 100644 Assets/07.RKVoiceCommand/package.json.meta diff --git a/Assets/00.StaryEvo/Editor/BuildAsset/CreatAssetWindow.cs b/Assets/00.StaryEvo/Editor/BuildAsset/CreatAssetWindow.cs index b71387f..699b5f2 100644 --- a/Assets/00.StaryEvo/Editor/BuildAsset/CreatAssetWindow.cs +++ b/Assets/00.StaryEvo/Editor/BuildAsset/CreatAssetWindow.cs @@ -9,6 +9,7 @@ using HybridCLR.Editor.Settings; using Sirenix.OdinInspector; using Sirenix.OdinInspector.Editor; using Sirenix.Utilities; +using Stary.Evo.InformationSave; using UnityEditor; using UnityEditorInternal; using UnityEngine; @@ -109,6 +110,15 @@ namespace Stary.Evo.Editor gameObj.transform.position = Vector3.zero; gameObj.transform.rotation = Quaternion.identity; gameObj.name = domain; + //创建位置层级 + GameObject transformInfo = new GameObject("TransformInfo"); + transformInfo.transform.SetParent(gameObj.transform); + transformInfo.transform.position = Vector3.zero; + transformInfo.transform.rotation = Quaternion.identity; + transformInfo.AddComponent(); + + + Directory.CreateDirectory($"{resPath}/Prefabs"); string rootPfbFilePath = $"Assets/Domain/{domain}/AddressableRes/Prefabs/{domain}.prefab"; var localPath = AssetDatabase.GenerateUniqueAssetPath(rootPfbFilePath); diff --git a/Assets/00.StaryEvo/Editor/com.stary.evo.editor.asmdef b/Assets/00.StaryEvo/Editor/com.stary.evo.editor.asmdef index b5630fe..6539f27 100644 --- a/Assets/00.StaryEvo/Editor/com.stary.evo.editor.asmdef +++ b/Assets/00.StaryEvo/Editor/com.stary.evo.editor.asmdef @@ -6,7 +6,8 @@ "GUID:c5ecc461727906345a35491a0440694f", "GUID:4d1926c9df5b052469a1c63448b7609a", "GUID:e34a5702dd353724aa315fb8011f08c3", - "GUID:9343e3f36d5deca4880d49f48b3fa2b1" + "GUID:9343e3f36d5deca4880d49f48b3fa2b1", + "GUID:ec45849e30ba03e4dab386099d8c697b" ], "includePlatforms": [ "Editor" diff --git a/Assets/00.StaryEvo/package.json b/Assets/00.StaryEvo/package.json index 5821f89..6344875 100644 --- a/Assets/00.StaryEvo/package.json +++ b/Assets/00.StaryEvo/package.json @@ -1,6 +1,6 @@ { "name": "com.staryevo.main", - "version": "1.0.12", + "version": "1.0.13", "displayName": "00.StaryEvo", "description": "This is an Framework package", "unity": "2021.3", @@ -17,7 +17,8 @@ "dependencies": { "com.cysharp.unitask": "2.5.10", "com.code-philosophy.hybridclr": "4.0.15", - "com.tuyoogame.yooasset": "2.3.7" + "com.tuyoogame.yooasset": "2.3.7", + "com.staryevo.informationsave": "1.x.x" }, "samples": [ { diff --git a/Assets/07.RKVoiceCommand/Editor.meta b/Assets/07.RKVoiceCommand/Editor.meta deleted file mode 100644 index a01f9c9..0000000 --- a/Assets/07.RKVoiceCommand/Editor.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 639fe5e44b4245e48b45ae80da27e408 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/07.RKVoiceCommand/README.md b/Assets/07.RKVoiceCommand/README.md deleted file mode 100644 index f44b9a0..0000000 --- a/Assets/07.RKVoiceCommand/README.md +++ /dev/null @@ -1 +0,0 @@ -# Rokid语音命令工具 diff --git a/Assets/07.RKVoiceCommand/README.md.meta b/Assets/07.RKVoiceCommand/README.md.meta deleted file mode 100644 index cac31cb..0000000 --- a/Assets/07.RKVoiceCommand/README.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 2007d74d73bee7d468ab76b4f3466708 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/07.RKVoiceCommand/RunTime.meta b/Assets/07.RKVoiceCommand/RunTime.meta deleted file mode 100644 index 716d4ec..0000000 --- a/Assets/07.RKVoiceCommand/RunTime.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d1654ed807ee7c24c94cab4c172e6f91 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/07.RKVoiceCommand/RunTime/IVoiceCommandSystem.cs b/Assets/07.RKVoiceCommand/RunTime/IVoiceCommandSystem.cs deleted file mode 100644 index 3814ac3..0000000 --- a/Assets/07.RKVoiceCommand/RunTime/IVoiceCommandSystem.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using Stary.Evo; - -public interface IVoiceCommandSystem : ISystem -{ - public void AddVoiceCommand(string content,string spell, Action action); - public void DeleteVoiceCommand(string content); - public void ClearAllVoiceCommands(); -} - -public class VoiceCommandSystem : AbstractSystem,IVoiceCommandSystem -{ - private VoiceCommandController _voiceController; - protected virtual string ControllerName - { - get { return "VoiceCommandController"; } - } - - private void createVoiceCommandContriller() - { - GameObject VoiceControllerObject = GameObject.Find(ControllerName); - if (VoiceControllerObject == null) - { - VoiceControllerObject = new GameObject(ControllerName); - } - _voiceController = VoiceControllerObject.GetComponent(); - if (_voiceController == null) - { - _voiceController = VoiceControllerObject.AddComponent(); - } - } - - public void AddVoiceCommand(string content,string spell, Action action) - { - if (_voiceController == null) createVoiceCommandContriller(); - _voiceController.RegisteredVoiceCommand(content, spell, action); - } - - public void DeleteVoiceCommand(string content) - { - if(_voiceController!=null) _voiceController.DeleteVoiceCommand(content); - } - - public void ClearAllVoiceCommands() - { - if (_voiceController != null) - { - _voiceController.ClearAllVoiceCommand(); - GameObject.Destroy(_voiceController.gameObject); - } - } - public override void Dispose() - { - ClearAllVoiceCommands(); - } - - protected override void OnInit() - { - throw new System.NotImplementedException(); - } -} \ No newline at end of file diff --git a/Assets/07.RKVoiceCommand/RunTime/IVoiceCommandSystem.cs.meta b/Assets/07.RKVoiceCommand/RunTime/IVoiceCommandSystem.cs.meta deleted file mode 100644 index 7963cbb..0000000 --- a/Assets/07.RKVoiceCommand/RunTime/IVoiceCommandSystem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 073d8fadbb202ad42a540fd5299555c3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/07.RKVoiceCommand/RunTime/RKVoiceCommand.RunTime.asmdef b/Assets/07.RKVoiceCommand/RunTime/RKVoiceCommand.RunTime.asmdef deleted file mode 100644 index 09cceec..0000000 --- a/Assets/07.RKVoiceCommand/RunTime/RKVoiceCommand.RunTime.asmdef +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "RKVoiceCommand.RunTime", - "rootNamespace": "", - "references": [ - "GUID:6447e10b87dc140ab924878c1ecef665", - "GUID:fe14bc9dd681249d19cf4ef377c7e29e", - "GUID:d1a793c2b6959e04ea45b972eaa369c8" - ], - "includePlatforms": [], - "excludePlatforms": [], - "allowUnsafeCode": false, - "overrideReferences": false, - "precompiledReferences": [], - "autoReferenced": true, - "defineConstraints": [], - "versionDefines": [], - "noEngineReferences": false -} \ No newline at end of file diff --git a/Assets/07.RKVoiceCommand/RunTime/RKVoiceCommand.RunTime.asmdef.meta b/Assets/07.RKVoiceCommand/RunTime/RKVoiceCommand.RunTime.asmdef.meta deleted file mode 100644 index bfec013..0000000 --- a/Assets/07.RKVoiceCommand/RunTime/RKVoiceCommand.RunTime.asmdef.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -<<<<<<<< HEAD:Assets/05.TableTextConversion/Editor/Excel.meta -guid: 10c9b58b77ad42b4193e2a393b1a9899 -folderAsset: yes -DefaultImporter: -======== -guid: 44e8639d57fc2a94b94ecef44bf1e36a -AssemblyDefinitionImporter: ->>>>>>>> 04.AudioCore:Assets/04.AudioCore/RunTime/AudioCore.RunTime.asmdef.meta - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/07.RKVoiceCommand/RunTime/VoiceCommandController.cs b/Assets/07.RKVoiceCommand/RunTime/VoiceCommandController.cs deleted file mode 100644 index 24c6508..0000000 --- a/Assets/07.RKVoiceCommand/RunTime/VoiceCommandController.cs +++ /dev/null @@ -1,104 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using Stary.Evo; -using Rokid.UXR.Module; -using UnityEngine.Android; - -public class VoiceCommandController : MonoBehaviour -{ - public Dictionary VoiceCommands = new Dictionary(); - public bool isInit = false; - - void Awake() - { - - } - - void Start() - { - //if (!Permission.HasUserAuthorizedPermission("android.permission.RECORD_AUDIO")) return; - - } - - /// - /// 注册语音指令 - /// - /// - /// - /// - public void RegisteredVoiceCommand(string content, string spell, Action action) - { - if (!isInit) - { - if (!Permission.HasUserAuthorizedPermission("android.permission.RECORD_AUDIO")) - { - Permission.RequestUserPermission("android.permission.RECORD_AUDIO"); - } - - ModuleManager.Instance.RegistModule("com.rokid.voicecommand.VoiceCommandHelper", false); - OfflineVoiceModule.Instance.ChangeVoiceCommandLanguage(LANGUAGE.CHINESE); - isInit = true; - } - - if (!VoiceCommands.ContainsKey(content)) - { - VoiceCommands.Add(content, action); - } - else - { - Debug.LogError($"语音命令 :“'{content}' ”已经注册了!!!"); - return; - } - OfflineVoiceModule.Instance.AddInstruct(LANGUAGE.CHINESE, content, spell, this.gameObject.name, "OnReceive"); - OfflineVoiceModule.Instance.Commit(); - } - - /// - /// 删除语音指令 - /// - /// - public void DeleteVoiceCommand(string content) - { - if (VoiceCommands.ContainsKey(content)) - { - VoiceCommands.Remove(content); - } - else - { - Debug.LogWarning($"语音命令 :“'{content}' 不存在!!!"); - } - } - - /// - /// 清除所有语音指令 - /// - public void ClearAllVoiceCommand() - { - VoiceCommands.Clear(); - OfflineVoiceModule.Instance.ClearAllInstruct(); - OfflineVoiceModule.Instance.Commit(); - } - - void OnReceive(string msg) - { - if (VoiceCommands.TryGetValue(msg, out Action action)) - { - action?.Invoke(); - } - - } - - void Update() - { - if (Input.GetKeyDown(KeyCode.Space)) - { - if (VoiceCommands.TryGetValue("变成绿色", out Action action)) - { - action?.Invoke(); - } - } - } - -} diff --git a/Assets/07.RKVoiceCommand/RunTime/VoiceCommandController.cs.meta b/Assets/07.RKVoiceCommand/RunTime/VoiceCommandController.cs.meta deleted file mode 100644 index 02d14c5..0000000 --- a/Assets/07.RKVoiceCommand/RunTime/VoiceCommandController.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9f55b7179dceeae47826f4f0f08ba3fd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/07.RKVoiceCommand/package.json b/Assets/07.RKVoiceCommand/package.json deleted file mode 100644 index 6cc445b..0000000 --- a/Assets/07.RKVoiceCommand/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "com.staryevo.rkvoicecommand", - "version": "1.0.1", - "displayName": "07.RKVoiceCommand", - "description": "Rokid语音命令工具", - "unity": "2021.3", - "unityRelease": "23f1", - "keywords": [ - "unity", - "scirpt" - ], - "author": { - "name": "staryEvo", - "url": "https://www.unity3d.com" - }, - "dependencies": { - "com.rokid.xr.unity":"3.0.3", - "com.staryevo.main":"1.x.x" - } -} diff --git a/Assets/07.RKVoiceCommand/package.json.meta b/Assets/07.RKVoiceCommand/package.json.meta deleted file mode 100644 index 2d5f4e9..0000000 --- a/Assets/07.RKVoiceCommand/package.json.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: c1e566c37939b1c45885d8ca929414a7 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: From 596e156e8e1428d934b385b27ca8184199d9436c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E9=93=AE?= <834207172@qq.com> Date: Wed, 16 Apr 2025 18:20:46 +0800 Subject: [PATCH 12/13] =?UTF-8?q?git=E7=A9=BA=E7=9B=AE=E5=BD=95=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E4=B8=8A=E4=BC=A0=EF=BC=8C=E5=A2=9E=E5=8A=A0=E6=A3=80?= =?UTF-8?q?=E7=B4=A2=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Editor/BuildAsset/CreatAssetWindow.cs | 133 +++++++++++------- .../Editor/BuildAsset/CreatDomainDirectory.cs | 27 ++++ .../BuildAsset/CreatDomainDirectory.cs.meta | 3 + .../BuildAsset/Entity/CreatDomainEntity.cs | 16 +++ Assets/00.StaryEvo/package.json | 2 +- 5 files changed, 133 insertions(+), 48 deletions(-) create mode 100644 Assets/00.StaryEvo/Editor/BuildAsset/CreatDomainDirectory.cs create mode 100644 Assets/00.StaryEvo/Editor/BuildAsset/CreatDomainDirectory.cs.meta diff --git a/Assets/00.StaryEvo/Editor/BuildAsset/CreatAssetWindow.cs b/Assets/00.StaryEvo/Editor/BuildAsset/CreatAssetWindow.cs index 699b5f2..0fc0042 100644 --- a/Assets/00.StaryEvo/Editor/BuildAsset/CreatAssetWindow.cs +++ b/Assets/00.StaryEvo/Editor/BuildAsset/CreatAssetWindow.cs @@ -16,6 +16,7 @@ using UnityEngine; namespace Stary.Evo.Editor { + public class CreatAssetWindow : OdinEditorWindow { [MenuItem("Evo/创建Domain作用域")] @@ -49,27 +50,28 @@ namespace Stary.Evo.Editor { Directory.CreateDirectory(artDomainPath); + if (!Directory.Exists(artDomainPath)) //创建Animation文件夹 - Directory.CreateDirectory(artDomainPath + "/Animation"); + CreatDirectory(artDomainPath + "/Animation"); //创建Effects文件夹 - Directory.CreateDirectory(artDomainPath + "/Effects"); + CreatDirectory(artDomainPath + "/Effects"); //创建Fbx文件夹 - Directory.CreateDirectory(artDomainPath + "/Fbx"); + CreatDirectory(artDomainPath + "/Fbx"); //创建Font文件夹 - Directory.CreateDirectory(artDomainPath + "/Font"); + CreatDirectory(artDomainPath + "/Font"); //创建Materials文件夹 - Directory.CreateDirectory(artDomainPath + "/Materials"); + CreatDirectory(artDomainPath + "/Materials"); //创建Prefabs文件夹 - Directory.CreateDirectory(artDomainPath + "/Prefabs"); + CreatDirectory(artDomainPath + "/Prefabs"); //创建Scenes文件夹 - Directory.CreateDirectory(artDomainPath + "/Scenes"); + CreatDirectory(artDomainPath + "/Scenes"); //创建/Scenes/Test文件夹 - Directory.CreateDirectory(artDomainPath + "/Scenes/Test"); + CreatDirectory(artDomainPath + "/Scenes/Test"); //创建Shader文件夹 - Directory.CreateDirectory(artDomainPath + "/Shader"); + CreatDirectory(artDomainPath + "/Shader"); //创建Textures文件夹 - Directory.CreateDirectory(artDomainPath + "/Textures"); - await File.WriteAllTextAsync( + CreatDirectory(artDomainPath + "/Textures"); + File.WriteAllTextAsync( $"{artDomainPath}/这里放所有美术的资源,因涉及打包依赖等原因,不建议在上一层节点新增文件夹,如涉及文件夹规范等问题请@张铮.hint", ""); } @@ -81,29 +83,29 @@ namespace Stary.Evo.Editor return; } - Directory.CreateDirectory(domainPath); + CreatDirectory(domainPath); //程序资源存放文件夹 string resPath = $"{domainPath}/AddressableRes"; - Directory.CreateDirectory(resPath); + CreatDirectory(resPath); //创建音频文件夹 - Directory.CreateDirectory(resPath + "/Audios"); + CreatDirectory(resPath + "/Audios"); //创建Config文件夹 - Directory.CreateDirectory(resPath + "/Config"); + CreatDirectory(resPath + "/Config"); //创建Dll文件夹 - Directory.CreateDirectory(resPath + "/Dll"); + CreatDirectory(resPath + "/Dll"); //创建Prefabs文件夹 - Directory.CreateDirectory(resPath + "/Prefabs"); + CreatDirectory(resPath + "/Prefabs"); //创建Scenes文件夹 - Directory.CreateDirectory(resPath + "/Scenes"); + CreatDirectory(resPath + "/Scenes"); //创建SpriteAtlas文件夹 - Directory.CreateDirectory(resPath + "/SpriteAtlas"); + CreatDirectory(resPath + "/SpriteAtlas"); //创建Sprites文件夹 - Directory.CreateDirectory(resPath + "/Sprites"); + CreatDirectory(resPath + "/Sprites"); //创建Video文件夹 - Directory.CreateDirectory(resPath + "/Video"); + CreatDirectory(resPath + "/Video"); - await File.WriteAllTextAsync($"{resPath}/这里放所有参与热更的资源.hint", ""); + File.WriteAllTextAsync($"{resPath}/这里放所有参与热更的资源.hint", ""); //主入口预制件 GameObject gameObj = new GameObject(domain); @@ -119,19 +121,19 @@ namespace Stary.Evo.Editor - Directory.CreateDirectory($"{resPath}/Prefabs"); + CreatDirectory($"{resPath}/Prefabs"); string rootPfbFilePath = $"Assets/Domain/{domain}/AddressableRes/Prefabs/{domain}.prefab"; var localPath = AssetDatabase.GenerateUniqueAssetPath(rootPfbFilePath); PrefabUtility.SaveAsPrefabAsset(gameObj, localPath); //存放脚本文件夹 string scriptsPath = $"{domainPath}/HotUpdate"; - Directory.CreateDirectory(scriptsPath); - await File.WriteAllTextAsync($"{scriptsPath}/这里放所有参与热更的脚本文件.hint", "该文件夹中的程序集定义文件,请勿删除,非常重要。"); + CreatDirectory(scriptsPath); + File.WriteAllTextAsync($"{scriptsPath}/这里放所有参与热更的脚本文件.hint", "该文件夹中的程序集定义文件,请勿删除,非常重要。"); //创建配置文件夹 string confPath = $"{domainPath}/Conf"; - Directory.CreateDirectory(confPath); + CreatDirectory(confPath); //程序集配置资源 @@ -146,21 +148,7 @@ namespace Stary.Evo.Editor body = body.Replace("ROOT_NAMESPACE", hotfixDomain); await writer.WriteAsync(body); } - - // await File.WriteAllTextAsync($"{scriptsPath}/{hotfixDomain}.asmdef", body); - - - // string architectureClassName = $"{domain}Architecture"; - // string architectureClassPath = $"{scriptsPath}/{architectureClassName}.txt"; - // //await File.WriteAllTextAsync($"{scriptsPath}/{architectureClassName}.cs", architectureTemplate); - // - // await using (var writer = new StreamWriter(architectureClassPath)) - // { - // - // string architectureTemplate = Resources.Load("ArchitectureTemplate").text; - // architectureTemplate = architectureTemplate.Replace("XXXX", architectureClassName); - // await writer.WriteAsync(architectureTemplate); - // } + //模块化脚本生成配置 string domainClassName = $"{domain}Domain"; string architectureClassName = $"{domain}Architecture"; @@ -234,13 +222,7 @@ namespace Stary.Evo.Editor } } - public void CreateDomainClass() - { - } - public void CreateArchitectureClass() - { - } [TitleGroup("预览Domain作用域")] public List domainList; @@ -312,5 +294,62 @@ namespace Stary.Evo.Editor return domainList; } + + private static void CreatDirectory(string artDomainPath) + { + if (!Directory.Exists(artDomainPath)) + { + //创建Animation文件夹 + Directory.CreateDirectory(artDomainPath); + } + } + + public static void CreateDomainDirectory(string domain) + { + string artDomainPath = $"{Application.dataPath}/Art/{domain}"; + //创建Animation文件夹 + CreatDirectory(artDomainPath + "/Animation"); + //创建Effects文件夹 + CreatDirectory(artDomainPath + "/Effects"); + //创建Fbx文件夹 + CreatDirectory(artDomainPath + "/Fbx"); + //创建Font文件夹 + CreatDirectory(artDomainPath + "/Font"); + //创建Materials文件夹 + CreatDirectory(artDomainPath + "/Materials"); + //创建Prefabs文件夹 + CreatDirectory(artDomainPath + "/Prefabs"); + //创建Scenes文件夹 + CreatDirectory(artDomainPath + "/Scenes"); + //创建/Scenes/Test文件夹 + CreatDirectory(artDomainPath + "/Scenes/Test"); + //创建Shader文件夹 + CreatDirectory(artDomainPath + "/Shader"); + //创建Textures文件夹 + CreatDirectory(artDomainPath + "/Textures"); + + string domainPath = $"{Application.dataPath}/Domain/{domain}"; + //程序资源存放文件夹 + string resPath = $"{domainPath}/AddressableRes"; + CreatDirectory(resPath); + //创建音频文件夹 + CreatDirectory(resPath + "/Audios"); + //创建Config文件夹 + CreatDirectory(resPath + "/Config"); + //创建Dll文件夹 + CreatDirectory(resPath + "/Dll"); + //创建Prefabs文件夹 + CreatDirectory(resPath + "/Prefabs"); + //创建Scenes文件夹 + CreatDirectory(resPath + "/Scenes"); + //创建SpriteAtlas文件夹 + CreatDirectory(resPath + "/SpriteAtlas"); + //创建Sprites文件夹 + CreatDirectory(resPath + "/Sprites"); + //创建Video文件夹 + CreatDirectory(resPath + "/Video"); + + AssetDatabase.Refresh(); + } } } \ No newline at end of file diff --git a/Assets/00.StaryEvo/Editor/BuildAsset/CreatDomainDirectory.cs b/Assets/00.StaryEvo/Editor/BuildAsset/CreatDomainDirectory.cs new file mode 100644 index 0000000..8882acb --- /dev/null +++ b/Assets/00.StaryEvo/Editor/BuildAsset/CreatDomainDirectory.cs @@ -0,0 +1,27 @@ +using Stary.Evo.Editor; +using UnityEditor; +using UnityEngine; + +namespace Stary.Evo +{ + [InitializeOnLoad] + public static class CreatDomainDirectory + { + static CreatDomainDirectory() + { + if (PlayerPrefs.GetInt("CreatDomainDirectory") == 0) + { + PlayerPrefs.SetInt("CreatDomainDirectory", 1); + bool isOk = EditorUtility.DisplayDialog("提示", "是否检索并创建缺失目录", "是", "否"); + if (isOk) + { + var DomainAll = CreatAssetWindow.GetCreatDomainAll(); + foreach (var domain in DomainAll) + { + CreatAssetWindow.CreateDomainDirectory(domain.DomainName); + } + } + } + } + } +} \ No newline at end of file diff --git a/Assets/00.StaryEvo/Editor/BuildAsset/CreatDomainDirectory.cs.meta b/Assets/00.StaryEvo/Editor/BuildAsset/CreatDomainDirectory.cs.meta new file mode 100644 index 0000000..e3c3856 --- /dev/null +++ b/Assets/00.StaryEvo/Editor/BuildAsset/CreatDomainDirectory.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 5388598f49c545f4ae628ad5d1b4e459 +timeCreated: 1744798434 \ No newline at end of file diff --git a/Assets/00.StaryEvo/Editor/BuildAsset/Entity/CreatDomainEntity.cs b/Assets/00.StaryEvo/Editor/BuildAsset/Entity/CreatDomainEntity.cs index cb0b3f6..0863645 100644 --- a/Assets/00.StaryEvo/Editor/BuildAsset/Entity/CreatDomainEntity.cs +++ b/Assets/00.StaryEvo/Editor/BuildAsset/Entity/CreatDomainEntity.cs @@ -22,6 +22,21 @@ namespace Stary.Evo.Editor this.domainList = domainList; } [HorizontalGroup(Width = 60)] + [Button("", Icon = SdfIconType.ArrowRepeat, IconAlignment = IconAlignment.RightEdge)] + public void CreatDomain() + { + if (DomainName == "Main") + { + EditorUtility.DisplayDialog("提示", "主包Main作用域无法再次创建", "确定"); + return; + } + bool isOk = EditorUtility.DisplayDialog("提示", "是否检索并创建缺失目录", "是", "否"); + if (isOk) + { + CreatAssetWindow.CreateDomainDirectory(DomainName); + } + } + [HorizontalGroup(Width = 60)] [Button("", Icon = SdfIconType.XCircle, IconAlignment = IconAlignment.RightEdge)] public void CloseDomain() { @@ -40,5 +55,6 @@ namespace Stary.Evo.Editor AssetDatabase.SaveAssets(); } } + } } \ No newline at end of file diff --git a/Assets/00.StaryEvo/package.json b/Assets/00.StaryEvo/package.json index 6344875..eaf9ff0 100644 --- a/Assets/00.StaryEvo/package.json +++ b/Assets/00.StaryEvo/package.json @@ -1,6 +1,6 @@ { "name": "com.staryevo.main", - "version": "1.0.13", + "version": "1.0.14", "displayName": "00.StaryEvo", "description": "This is an Framework package", "unity": "2021.3", From 8c5c2580c4d91b023e59737a76735ed58da9dc75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E9=93=AE?= <834207172@qq.com> Date: Thu, 17 Apr 2025 16:36:24 +0800 Subject: [PATCH 13/13] =?UTF-8?q?00=20=E6=9B=B4=E6=96=B0res=E6=89=93?= =?UTF-8?q?=E5=8C=85=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Editor/BuildAsset/CreatDomainDirectory.cs | 2 +- .../Editor/MarkAdressable/MarkAdressable.cs | 16 ++++++++++------ Assets/00.StaryEvo/package.json | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Assets/00.StaryEvo/Editor/BuildAsset/CreatDomainDirectory.cs b/Assets/00.StaryEvo/Editor/BuildAsset/CreatDomainDirectory.cs index 8882acb..51ea5a5 100644 --- a/Assets/00.StaryEvo/Editor/BuildAsset/CreatDomainDirectory.cs +++ b/Assets/00.StaryEvo/Editor/BuildAsset/CreatDomainDirectory.cs @@ -12,7 +12,7 @@ namespace Stary.Evo if (PlayerPrefs.GetInt("CreatDomainDirectory") == 0) { PlayerPrefs.SetInt("CreatDomainDirectory", 1); - bool isOk = EditorUtility.DisplayDialog("提示", "是否检索并创建缺失目录", "是", "否"); + bool isOk = EditorUtility.DisplayDialog("提示", "发现目录存在缺失,是否检索并创建缺失目录", "是", "否"); if (isOk) { var DomainAll = CreatAssetWindow.GetCreatDomainAll(); diff --git a/Assets/00.StaryEvo/Editor/MarkAdressable/MarkAdressable.cs b/Assets/00.StaryEvo/Editor/MarkAdressable/MarkAdressable.cs index 004ffac..99cb3ae 100644 --- a/Assets/00.StaryEvo/Editor/MarkAdressable/MarkAdressable.cs +++ b/Assets/00.StaryEvo/Editor/MarkAdressable/MarkAdressable.cs @@ -25,11 +25,11 @@ namespace Stary.Evo.Editor get { return Application.dataPath + "/Domain"; } } - // public static string AtlasRemotedRoot - // { - // get { return Application.dataPath + "/AddressableRes/Sprites"; } - // } - // + public static string MainDomainRoot + { + get { return Application.dataPath + "/Main"; } + } + // public static string SpriteRemotedAtlas // { // get { return Application.dataPath + "/AddressableRes/SpriteAtlas"; } @@ -154,10 +154,14 @@ namespace Stary.Evo.Editor HotfixMainResDomain hotfixMainResDomain = AssetDatabase.LoadAssetAtPath(configPath); packageName = hotfixMainResDomain.hotfixMainResDomainEntity.domain; Mark(); + if(!BuildAssetWindow.GetBuildPackageName().Equals("Main")) CreateRes(packageName, $"{DomainRoot}/{BuildAssetWindow.GetBuildPackageName()}/AddressableRes", $"{DomainRoot}/{BuildAssetWindow.GetBuildPackageName()}/HotUpdate"); - + else + CreateRes(packageName, + $"{DomainRoot}/{BuildAssetWindow.GetBuildPackageName()}/AddressableRes", + $"{MainDomainRoot}/Script/Runtime/HotUpdate"); EditorUtility.DisplayDialog("自动标记", "自动标记成功", "确定"); } diff --git a/Assets/00.StaryEvo/package.json b/Assets/00.StaryEvo/package.json index eaf9ff0..ee37002 100644 --- a/Assets/00.StaryEvo/package.json +++ b/Assets/00.StaryEvo/package.json @@ -1,6 +1,6 @@ { "name": "com.staryevo.main", - "version": "1.0.14", + "version": "1.0.15", "displayName": "00.StaryEvo", "description": "This is an Framework package", "unity": "2021.3",