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] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=80=E4=B8=AA=E4=BD=8D?= =?UTF-8?q?=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: