diff --git a/Assets/00.StaryEvo/Editor/Build/BuildApkEntity.cs b/Assets/00.StaryEvo/Editor/Build/BuildApkEntity.cs new file mode 100644 index 0000000..66f9578 --- /dev/null +++ b/Assets/00.StaryEvo/Editor/Build/BuildApkEntity.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using Sirenix.OdinInspector; +using Sirenix.OdinInspector.Editor; +using UnityEditor; +using UnityEditor.Build.Reporting; +using UnityEngine; + +[Serializable] +public class BuildApkEntity +{ + public BuildApkEntity(Action OnBuildApkAction, Action OnBuildApkUpdateAction) + { + this._onBuildApkAction = OnBuildApkAction; + this._onBuildApkUpdateAction = OnBuildApkUpdateAction; + } + + + private Action _onBuildApkAction; + private Action _onBuildApkUpdateAction; + + [Button("打包", ButtonSizes.Large)] + private void BuildApk() + { + this._onBuildApkAction?.Invoke(); + } + + [Button("上传服务器", ButtonSizes.Large)] + private void BuildApkUpdate() + { + this._onBuildApkUpdateAction?.Invoke(); + } +} \ No newline at end of file diff --git a/Assets/00.StaryEvo/Editor/Build/BuildApkEntity.cs.meta b/Assets/00.StaryEvo/Editor/Build/BuildApkEntity.cs.meta new file mode 100644 index 0000000..ef61cb1 --- /dev/null +++ b/Assets/00.StaryEvo/Editor/Build/BuildApkEntity.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 9d2f8d70d3b1414a934ca1b195d13b9c +timeCreated: 1751429102 \ No newline at end of file diff --git a/Assets/00.StaryEvo/Editor/Build/BuildApkWindow.cs b/Assets/00.StaryEvo/Editor/Build/BuildApkWindow.cs new file mode 100644 index 0000000..cec020a --- /dev/null +++ b/Assets/00.StaryEvo/Editor/Build/BuildApkWindow.cs @@ -0,0 +1,126 @@ +using System; +using System.Collections.Generic; +using Sirenix.OdinInspector; +using Sirenix.OdinInspector.Editor; +using Stary.Evo; +using UnityEditor; +using UnityEditor.Build.Reporting; +using UnityEngine; +using BuildReport = UnityEditor.Build.Reporting.BuildReport; + +public class BuildApkWindow : OdinEditorWindow +{ + public static OdinEditorWindow window; + + [MenuItem("Evo/Apk打包工具")] + static void ShowWindows() + { + window = (BuildApkWindow)EditorWindow.GetWindow(typeof(BuildApkWindow)); + window.maxSize = new Vector2(400, 500); + window.Show(); + } + + protected override void Initialize() + { + base.Initialize(); + buildApkLocalEntity = new BuildApkEntity(BuildAndroid, BuildAndroid); + buildApkServerEntity = new BuildApkEntity(BuildAndroid, BuildAndroid); + buildApkWatermarkEntity = new BuildApkEntity(BuildAndroid, BuildAndroid); + } + + [EnumToggleButtons, HideLabel] public DeviceType deviceType; + + [BoxGroup("Build(清空打包缓存)", centerLabel: true, order: 1)] + [Button("清空打包缓存")] + void OnClearCache() + { + // 清理Library缓存目录 + // 使用System.IO删除 + // try { + // System.IO.Directory.Delete(Application.dataPath + "/../Library/AssetImportState", true); + // Debug.Log("成功删除AssetImportState"); + // } catch (System.Exception e) { + // Debug.LogError($"删除失败: {e.Message}"); + // } + // 使用System.IO删除 + try + { + System.IO.Directory.Delete(Application.dataPath + "/../Library/BuildCache", true); + Debug.Log("成功删除BuildCache"); + } + catch (System.Exception e) + { + Debug.LogError($"删除失败: {e.Message}"); + } + + // 使用System.IO删除 + try + { + System.IO.Directory.Delete(Application.dataPath + "/../Library/ScriptAssemblies", true); + Debug.Log("成功删除ScriptAssemblies"); + } + catch (System.Exception e) + { + Debug.LogError($"删除失败: {e.Message}"); + } + + AssetDatabase.Refresh(); + EditorUtility.DisplayDialog("缓存清理", "已成功清除所有打包缓存文件", "确定"); + } + + [BoxGroup("Build(普通包\\服务器本地包)", centerLabel: true, order: 2), HideLabel] + public BuildApkEntity buildApkLocalEntity; + + [BoxGroup("Build(服务器热更包)", centerLabel: true, order: 3), HideLabel] + public BuildApkEntity buildApkServerEntity; + + [BoxGroup("Build(水印包)", centerLabel: true, order: 4), HideLabel] + public BuildApkEntity buildApkWatermarkEntity; + + public void BuildAndroid() + { + HotfixMainResDomain hotfixMainResDomain = Resources.Load("HotfixMainResDomain"); + if (hotfixMainResDomain == null) + { + Debug.LogError("HotfixMainResDomain 资源在Resources下不存在,请检查!"); + } + + // 设置包名和项目名 + PlayerSettings.productName = hotfixMainResDomain.projectInfo.projectName; + PlayerSettings.applicationIdentifier = hotfixMainResDomain.projectInfo.projectPackageName; + + // 配置构建选项 + BuildPlayerOptions buildOptions = new BuildPlayerOptions + { + scenes = new[] + { + $"Assets/SplashScreen/EvoScenes/loading.unity", + $"Assets/Main/main_{deviceType.ToString()}.unity" + }, + locationPathName = $"Builds/Android/{PlayerSettings.applicationIdentifier}.apk", + target = BuildTarget.Android, + options = BuildOptions.None + }; + + // 执行打包 + BuildReport report = BuildPipeline.BuildPlayer(buildOptions); + + BuildSummary summary = report.summary; + if (summary.result == BuildResult.Succeeded) + { + Debug.Log("Build succeeded: " + summary.totalSize + " bytes"); + } + + if (summary.result == BuildResult.Failed) + { + Debug.LogError("Build failed"); + } + } + + + public enum DeviceType + { + Xreal, + Rokid + } +} \ No newline at end of file diff --git a/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script/CommandAnd.cs.meta b/Assets/00.StaryEvo/Editor/Build/BuildApkWindow.cs.meta similarity index 83% rename from Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script/CommandAnd.cs.meta rename to Assets/00.StaryEvo/Editor/Build/BuildApkWindow.cs.meta index 063ea8b..4fc95e3 100644 --- a/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script/CommandAnd.cs.meta +++ b/Assets/00.StaryEvo/Editor/Build/BuildApkWindow.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ca5d6aa1e6bbab64dbbdeace6b015b23 +guid: 81361a51e315e2345b51e3004941d04a MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/00.StaryEvo/Editor/BuildAsset/BuildAssetWindow.cs b/Assets/00.StaryEvo/Editor/BuildAsset/BuildAssetWindow.cs index 35a35db..83a32e7 100644 --- a/Assets/00.StaryEvo/Editor/BuildAsset/BuildAssetWindow.cs +++ b/Assets/00.StaryEvo/Editor/BuildAsset/BuildAssetWindow.cs @@ -10,19 +10,17 @@ using System; using System.Collections.Generic; using System.IO; using System.IO.Compression; -using System.Linq; using System.Threading.Tasks; -using EditorFramework; +#if HotUpdate using HybridCLR.Editor; using HybridCLR.Editor.Commands; +#endif using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Sirenix.OdinInspector; using Sirenix.OdinInspector.Editor; using UnityEditor; -using UnityEditorInternal; using UnityEngine; -using UnityEngine.Serialization; using YooAsset; using YooAsset.Editor; @@ -36,6 +34,18 @@ namespace Stary.Evo.Editor [MenuItem("Evo/资源打包工具")] static void ShowWindows() { +#if NotUpdate + +#elif HotUpdate +#endif + +#if NotUpdate + if (EditorUtility.DisplayDialog("提示", "当前为非热更模式,不支持热更打包功能,是否切换热更模式", "是", "否")) + { + ChangeHotUpdateSchema.SetHotUpdateMode(HotUpdateMode.HotUpdate); + } + +#elif HotUpdate if (CreatAssetWindow.GetCreatDomainAll().Count <= 0) { EditorUtility.DisplayDialog("提示", "不存在Domain元素,无法打开此面板,请先创建Domain元素", "确定"); @@ -44,6 +54,7 @@ namespace Stary.Evo.Editor window = (BuildAssetWindow)EditorWindow.GetWindow(typeof(BuildAssetWindow)); window.Show(); +#endif } protected override void OnDisable() @@ -86,7 +97,7 @@ namespace Stary.Evo.Editor [ShowIf("@ buildAssetType== BuildAssetType.Login")] [BoxGroup("Login", showLabel: false)] public string ip, userName, password; - + [ShowIf("@ buildAssetType== BuildAssetType.Login")] [BoxGroup("Login", showLabel: false)] [Button("登录", ButtonSizes.Large)] @@ -167,8 +178,10 @@ namespace Stary.Evo.Editor public BuildAssetEntity hyBridClrBuildEntity = new BuildAssetEntity("HyBridCLRBuild", "DllBuildTarget", () => { +#if HotUpdate //PrebuildCommand.GenerateAll(); CompileDllCommand.CompileDllActiveBuildTarget(); +#endif }); #endregion @@ -380,6 +393,7 @@ namespace Stary.Evo.Editor Debug.LogError($"UnityEvo:读取资源配置表失败【HotfixMainResDomain】...表不存在"); return; } + var ip = hotfixMainResDomain.hotfixMainResDomainEntity.ipconfig; var messageEntity = await WebRequestSystem.PostFile(ip + "/FileLoad/UpLoadFile", new[] { zipFilePath }); EditorUtility.DisplayProgressBar("提示", $"开始上传{setting.packageName}(上传zip文件)", 0.5f); diff --git a/Assets/00.StaryEvo/Editor/ChangePlayerMode.meta b/Assets/00.StaryEvo/Editor/BuildAsset/ChangePlayerMode.meta similarity index 100% rename from Assets/00.StaryEvo/Editor/ChangePlayerMode.meta rename to Assets/00.StaryEvo/Editor/BuildAsset/ChangePlayerMode.meta diff --git a/Assets/00.StaryEvo/Editor/BuildAsset/ChangePlayerMode/ChangeHotUpdateMode.cs b/Assets/00.StaryEvo/Editor/BuildAsset/ChangePlayerMode/ChangeHotUpdateMode.cs new file mode 100644 index 0000000..11c6576 --- /dev/null +++ b/Assets/00.StaryEvo/Editor/BuildAsset/ChangePlayerMode/ChangeHotUpdateMode.cs @@ -0,0 +1,78 @@ +using System; +using System.Linq; +using UnityEditor; +using UnityEngine; + +namespace Stary.Evo.Editor +{ + public class ChangeHotUpdateSchema + { + public static HotUpdateMode HotUpdateMode + { + get => _hotUpdate; + set => SetHotUpdateMode(value); + } + + private static HotUpdateMode _hotUpdate; + + private const string EditorNotUpdateMode = "Evo/ChangeHotUpdateSchema/NOTUPDARE(非热更模式)"; + private const string EditorHotUpdateMode = "Evo/ChangeHotUpdateSchema/HOTUPDATE(热更模式)"; + + [MenuItem(EditorNotUpdateMode)] + private static void SetNotUpdateMode() => SetHotUpdateMode(HotUpdateMode.NotUpdate); + + [MenuItem(EditorHotUpdateMode)] + private static void SetHotUpdateMode() => SetHotUpdateMode(HotUpdateMode.HotUpdate); + + // [MenuItem(WebPlayMode)] + // private static void SetWebMode() => SetPlayerMode(HotUpdateMode.WEB_PLAYMODE); + + [MenuItem(EditorNotUpdateMode, true)] + private static bool ValidateModeMenu() + { + string platform = EditorPrefs.GetString("ChangeHotUpdateSchema"); + Menu.SetChecked(EditorNotUpdateMode, platform == HotUpdateMode.NotUpdate.ToString()); + Menu.SetChecked(EditorHotUpdateMode, platform == HotUpdateMode.HotUpdate.ToString()); + //Menu.SetChecked(WebPlayMode, platform == HotUpdateMode.WEB_PLAYMODE.ToString()); + Debug.LogError("ChangeHotUpdateSchema"); + return true; + } + + public static void SetHotUpdateMode(HotUpdateMode mode) + { + // 清除所有旧模式定义 + var currentTarget = EditorUserBuildSettings.selectedBuildTargetGroup; + if (currentTarget == BuildTargetGroup.Unknown) return; + + var defines = PlayerSettings.GetScriptingDefineSymbolsForGroup(currentTarget) + .Split(';') + .Where(d => !Enum.GetNames(typeof(HotUpdateMode)).Contains(d)) + .ToList(); + + // 添加新模式 + defines.Add(mode.ToString()); + PlayerSettings.SetScriptingDefineSymbolsForGroup(currentTarget, string.Join(";", defines)); + Debug.Log($"当前编译符号: {string.Join(";", defines)}"); // 添加调试日志 + _hotUpdate = mode; + EditorPrefs.SetString("ChangeHotUpdateSchema", _hotUpdate.ToString()); + + ValidateModeMenu(); + AssetDatabase.Refresh(); + // 添加解决方案文件重新生成逻辑 + EditorApplication.delayCall += () => + { + EditorApplication.ExecuteMenuItem("Assets/Open C# Project"); + UnityEditor.Compilation.CompilationPipeline.RequestScriptCompilation(); + Debug.Log("已强制重新生成解决方案文件"); + }; + } + } + + public enum HotUpdateMode + { + //非热更模式, + NotUpdate, + //热更模式 + HotUpdate, + } +} \ No newline at end of file diff --git a/Assets/00.StaryEvo/Editor/BuildAsset/ChangePlayerMode/ChangeHotUpdateMode.cs.meta b/Assets/00.StaryEvo/Editor/BuildAsset/ChangePlayerMode/ChangeHotUpdateMode.cs.meta new file mode 100644 index 0000000..735e809 --- /dev/null +++ b/Assets/00.StaryEvo/Editor/BuildAsset/ChangePlayerMode/ChangeHotUpdateMode.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 7d18419d2d9c488687f9aff50cbd8357 +timeCreated: 1751423025 \ No newline at end of file diff --git a/Assets/00.StaryEvo/Editor/ChangePlayerMode/ChangePlayerMode.cs b/Assets/00.StaryEvo/Editor/BuildAsset/ChangePlayerMode/ChangePlayerMode.cs similarity index 75% rename from Assets/00.StaryEvo/Editor/ChangePlayerMode/ChangePlayerMode.cs rename to Assets/00.StaryEvo/Editor/BuildAsset/ChangePlayerMode/ChangePlayerMode.cs index adc038e..4162573 100644 --- a/Assets/00.StaryEvo/Editor/ChangePlayerMode/ChangePlayerMode.cs +++ b/Assets/00.StaryEvo/Editor/BuildAsset/ChangePlayerMode/ChangePlayerMode.cs @@ -5,7 +5,7 @@ using UnityEngine; namespace Stary.Evo.Editor { - public class ChangePlayerMode + public class ChangePlayerSchema { public static PLayerMode PLayerMode { @@ -15,10 +15,10 @@ namespace Stary.Evo.Editor private static PLayerMode _pLayerMode; - private const string EditorSimulateMode = "Evo/ChangePlayerMode/EditorSimulateMode(编辑器调试模式)"; - private const string OfflinePlayMode = "Evo/ChangePlayerMode/OfflinePlayMode(本地运行模式)"; - private const string HostPlayMode = "Evo/ChangePlayerMode/HostPlayMode(服务器运行模式)"; - private const string WebPlayMode = "Evo/ChangePlayerMode/WebPlayMode(Web运行模式)"; + private const string EditorSimulateMode = "Evo/ChangePlayerSchema/EditorSimulateMode(编辑器调试模式)"; + private const string OfflinePlayMode = "Evo/ChangePlayerSchema/OfflinePlayMode(本地运行模式)"; + private const string HostPlayMode = "Evo/ChangePlayerSchema/HostPlayMode(服务器运行模式)"; + private const string WebPlayMode = "Evo/ChangePlayerSchema/WebPlayMode(Web运行模式)"; [MenuItem(EditorSimulateMode)] private static void SetEditorMode() => SetPlayerMode(PLayerMode.EDITOR_SIMULATEMODE); @@ -29,22 +29,22 @@ namespace Stary.Evo.Editor [MenuItem(HostPlayMode)] private static void SetHostMode() => SetPlayerMode(PLayerMode.HOST_PLAYMODE); - [MenuItem(WebPlayMode)] - private static void SetWebMode() => SetPlayerMode(PLayerMode.WEB_PLAYMODE); + // [MenuItem(WebPlayMode)] + // private static void SetWebMode() => SetPlayerMode(PLayerMode.WEB_PLAYMODE); [MenuItem(EditorSimulateMode, true)] private static bool ValidateModeMenu() { - string platform = EditorPrefs.GetString("ChangePLayerMode", PLayerMode.EDITOR_SIMULATEMODE.ToString()); + string platform = EditorPrefs.GetString("ChangePlayerSchema"); Menu.SetChecked(EditorSimulateMode, platform == PLayerMode.EDITOR_SIMULATEMODE.ToString()); Menu.SetChecked(OfflinePlayMode, platform == PLayerMode.OFFLINE_PLAYMODE.ToString()); Menu.SetChecked(HostPlayMode, platform == PLayerMode.HOST_PLAYMODE.ToString()); - Menu.SetChecked(WebPlayMode, platform == PLayerMode.WEB_PLAYMODE.ToString()); + //Menu.SetChecked(WebPlayMode, platform == PLayerMode.WEB_PLAYMODE.ToString()); Debug.LogError("CheckPlatform"); return true; } - private static void SetPlayerMode(PLayerMode mode) + public static void SetPlayerMode(PLayerMode mode) { // 清除所有旧模式定义 var currentTarget = EditorUserBuildSettings.selectedBuildTargetGroup; @@ -60,7 +60,8 @@ namespace Stary.Evo.Editor PlayerSettings.SetScriptingDefineSymbolsForGroup(currentTarget, string.Join(";", defines)); Debug.Log($"当前编译符号: {string.Join(";", defines)}"); // 添加调试日志 _pLayerMode = mode; - EditorPrefs.SetString("ChangePLayerMode", _pLayerMode.ToString()); + EditorPrefs.SetString("ChangePlayerSchema", _pLayerMode.ToString()); + ValidateModeMenu(); AssetDatabase.Refresh(); // 添加解决方案文件重新生成逻辑 EditorApplication.delayCall += () => @@ -83,7 +84,7 @@ namespace Stary.Evo.Editor //联机运行模式 HOST_PLAYMODE, - //web运行模式 - WEB_PLAYMODE + // //web运行模式 + // WEB_PLAYMODE } } \ No newline at end of file diff --git a/Assets/00.StaryEvo/Editor/ChangePlayerMode/ChangePlayerMode.cs.meta b/Assets/00.StaryEvo/Editor/BuildAsset/ChangePlayerMode/ChangePlayerMode.cs.meta similarity index 100% rename from Assets/00.StaryEvo/Editor/ChangePlayerMode/ChangePlayerMode.cs.meta rename to Assets/00.StaryEvo/Editor/BuildAsset/ChangePlayerMode/ChangePlayerMode.cs.meta diff --git a/Assets/00.StaryEvo/Editor/BuildAsset/CreatAssetWindow.cs b/Assets/00.StaryEvo/Editor/BuildAsset/CreatAssetWindow.cs index d7ad156..6aae15e 100644 --- a/Assets/00.StaryEvo/Editor/BuildAsset/CreatAssetWindow.cs +++ b/Assets/00.StaryEvo/Editor/BuildAsset/CreatAssetWindow.cs @@ -2,8 +2,10 @@ using System; using System.Collections.Generic; using System.IO; using System.Linq; +#if HotUpdate using HybridCLR.Editor; using HybridCLR.Editor.Settings; +#endif using Sirenix.OdinInspector; using Sirenix.OdinInspector.Editor; using Stary.Evo.InformationSave; @@ -13,7 +15,6 @@ using UnityEngine; namespace Stary.Evo.Editor { - public class CreatAssetWindow : OdinEditorWindow { [MenuItem("Evo/创建Domain作用域")] @@ -48,8 +49,8 @@ namespace Stary.Evo.Editor Directory.CreateDirectory(artDomainPath); if (!Directory.Exists(artDomainPath)) - //创建Animation文件夹 - CreatDirectory(artDomainPath + "/Animation"); + //创建Animation文件夹 + CreatDirectory(artDomainPath + "/Animation"); //创建Effects文件夹 CreatDirectory(artDomainPath + "/Effects"); //创建Fbx文件夹 @@ -115,9 +116,8 @@ namespace Stary.Evo.Editor transformInfo.transform.position = Vector3.zero; transformInfo.transform.rotation = Quaternion.identity; transformInfo.AddComponent(); - - - + + CreatDirectory($"{resPath}/Prefabs"); string rootPfbFilePath = $"Assets/Domain/{domain}/AddressableRes/Prefabs/{domain}.prefab"; var localPath = AssetDatabase.GenerateUniqueAssetPath(rootPfbFilePath); @@ -145,11 +145,11 @@ namespace Stary.Evo.Editor body = body.Replace("ROOT_NAMESPACE", hotfixDomain); await writer.WriteAsync(body); } - + //模块化脚本生成配置 string domainClassName = $"{domain}Domain"; string architectureClassName = $"{domain}Architecture"; - +#if HotUpdate //模块配置资源 DomainConfig moduleConfig = CreateInstance(); moduleConfig.domain = domain; @@ -158,7 +158,7 @@ namespace Stary.Evo.Editor moduleConfig.@namespace = domain; AssetDatabase.CreateAsset(moduleConfig, $"Assets/Domain/{domain}/AddressableRes/Config/DomainConfig.asset"); // - + //编辑器配置资源 BuildAssetDataSetting buildAssetDataSetting = CreateInstance(); @@ -174,6 +174,7 @@ namespace Stary.Evo.Editor AssetDatabase.LoadAssetAtPath(configPath); if (domain != "Main") { + // 将程序集定义添加到 HybridCLR 热更列表 var settings = SettingsUtil.HybridCLRSettings; if (!settings.hotUpdateAssemblyDefinitions.Contains(assemblyDefinitionAsset)) @@ -195,8 +196,9 @@ namespace Stary.Evo.Editor HybridCLRSettings.Instance.hotUpdateAssemblyDefinitions = assemblies.ToArray(); HybridCLRSettings.Save(); - } + } +#endif AssetDatabase.SaveAssets(); @@ -215,7 +217,6 @@ namespace Stary.Evo.Editor } - [TitleGroup("预览Domain作用域")] public List domainList; protected override void Initialize() @@ -319,7 +320,7 @@ namespace Stary.Evo.Editor CreatDirectory(artDomainPath + "/Shader"); //创建Textures文件夹 CreatDirectory(artDomainPath + "/Textures"); - + string domainPath = $"{Application.dataPath}/Domain/{domain}"; //程序资源存放文件夹 string resPath = $"{domainPath}/AddressableRes"; @@ -340,7 +341,7 @@ namespace Stary.Evo.Editor CreatDirectory(resPath + "/Sprites"); //创建Video文件夹 CreatDirectory(resPath + "/Video"); - + AssetDatabase.Refresh(); } } diff --git a/Assets/00.StaryEvo/Editor/BuildAsset/CreatDomainDirectory.cs b/Assets/00.StaryEvo/Editor/BuildAsset/CreatDomainDirectory.cs index 51ea5a5..44a0779 100644 --- a/Assets/00.StaryEvo/Editor/BuildAsset/CreatDomainDirectory.cs +++ b/Assets/00.StaryEvo/Editor/BuildAsset/CreatDomainDirectory.cs @@ -1,4 +1,5 @@ -using Stary.Evo.Editor; +using System; +using Stary.Evo.Editor; using UnityEditor; using UnityEngine; @@ -9,19 +10,70 @@ namespace Stary.Evo { static CreatDomainDirectory() { - if (PlayerPrefs.GetInt("CreatDomainDirectory") == 0) + // 注意 因为这个构造函数会被重复调用, + //所以为了防止quitting和update两个回调被重复添加,需要先移除后添加 + EditorApplication.quitting -= OnEditorQuit; + EditorApplication.quitting += OnEditorQuit; + + Debug.Log(" 自动运行 "); + + if (!PlayerPrefs.HasKey("StartUp")) { - PlayerPrefs.SetInt("CreatDomainDirectory", 1); - bool isOk = EditorUtility.DisplayDialog("提示", "发现目录存在缺失,是否检索并创建缺失目录", "是", "否"); - if (isOk) + // 通过标记记录是否已经执行过该方法 + OnEditorStartUp(); + PlayerPrefs.SetInt("StartUp", 1); + + if (PlayerPrefs.GetInt("CreatDomainDirectory") == 0) { - var DomainAll = CreatAssetWindow.GetCreatDomainAll(); - foreach (var domain in DomainAll) + PlayerPrefs.SetInt("CreatDomainDirectory", 1); + bool isOk = EditorUtility.DisplayDialog("提示", "发现目录存在缺失,是否检索并创建缺失目录", "是", "否"); + if (isOk) { - CreatAssetWindow.CreateDomainDirectory(domain.DomainName); + var DomainAll = CreatAssetWindow.GetCreatDomainAll(); + foreach (var domain in DomainAll) + { + CreatAssetWindow.CreateDomainDirectory(domain.DomainName); + } } } + + if (EditorPrefs.GetString("ChangeHotUpdateSchema") == "") + { + ChangeHotUpdateSchema.SetHotUpdateMode(HotUpdateMode.NotUpdate); + } + else + { + ChangeHotUpdateSchema.SetHotUpdateMode( + Enum.Parse(EditorPrefs.GetString("ChangeHotUpdateSchema"))); + } + + if (EditorPrefs.GetString("ChangePlayerSchema") == "") + { + ChangePlayerSchema.SetPlayerMode(PLayerMode.EDITOR_SIMULATEMODE); + } + else + { + ChangePlayerSchema.SetPlayerMode( + Enum.Parse(EditorPrefs.GetString("ChangePlayerSchema"))); + } } - } + } + + + /// + /// UnityEditor 关闭时取消标记 + /// + private static void OnEditorQuit() + { + PlayerPrefs.DeleteKey("StartUp"); + } + + /// + /// 只会在UnityEditor启动时执行一次 + /// + static void OnEditorStartUp() + { + Debug.Log(" UnityEditor 启动 "); + } } } \ No newline at end of file diff --git a/Assets/00.StaryEvo/Editor/BuildAsset/OneKeyBuildWindow.cs b/Assets/00.StaryEvo/Editor/BuildAsset/OneKeyBuildWindow.cs index e154935..1dc72bb 100644 --- a/Assets/00.StaryEvo/Editor/BuildAsset/OneKeyBuildWindow.cs +++ b/Assets/00.StaryEvo/Editor/BuildAsset/OneKeyBuildWindow.cs @@ -1,7 +1,9 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; +#if HotUpdate using HybridCLR.Editor.Commands; +#endif using Newtonsoft.Json; using Sirenix.OdinInspector; using Sirenix.OdinInspector.Editor; @@ -16,8 +18,19 @@ namespace Stary.Evo.Editor [MenuItem("Evo/(一键)打包工具")] static void Init() { - var window = (OneKeyBuildWindow)EditorWindow.GetWindow(typeof(OneKeyBuildWindow)); +#if NotUpdate + if (EditorUtility.DisplayDialog("提示", "当前为非热更模式,不支持热更打包功能,是否切换热更模式", "是", "否")) + { + ChangeHotUpdateSchema.SetHotUpdateMode(HotUpdateMode.HotUpdate); + } +#elif HotUpdate + var window = (OneKeyBuildWindow)EditorWindow.GetWindow(typeof(OneKeyBuildWindow)); window.Show(); +#endif + + + + } [Title("全选"), OnValueChanged("OneKeyBuildEvent"), HideLabel] @@ -44,6 +57,7 @@ namespace Stary.Evo.Editor [Button("(一键)标记选择资源", ButtonSizes.Large)] public void OneClickMark() { +#if HotUpdate //打dll CompileDllCommand.CompileDllActiveBuildTarget(); //拷贝dll @@ -51,6 +65,7 @@ namespace Stary.Evo.Editor //标记全部资源 MarkAdressable.AddMarkAll(OneKeyBuildEntities); EditorUtility.DisplayDialog("提示", $"标记所有资源完成!", "确定"); +#endif } [Button("(一键)获取服务器版本", ButtonSizes.Large)] diff --git a/Assets/00.StaryEvo/~Samples.meta b/Assets/00.StaryEvo/Editor/Entity.meta similarity index 77% rename from Assets/00.StaryEvo/~Samples.meta rename to Assets/00.StaryEvo/Editor/Entity.meta index a304446..a779dc9 100644 --- a/Assets/00.StaryEvo/~Samples.meta +++ b/Assets/00.StaryEvo/Editor/Entity.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 50c0b79ec6a68a24cb577c05cefb670d +guid: 281c4d7ec043eaf4290db0498dd5294d folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/00.StaryEvo/Editor/Entity/HotfixMainResDomainEditor.cs b/Assets/00.StaryEvo/Editor/Entity/HotfixMainResDomainEditor.cs new file mode 100644 index 0000000..2807efe --- /dev/null +++ b/Assets/00.StaryEvo/Editor/Entity/HotfixMainResDomainEditor.cs @@ -0,0 +1,29 @@ +using System.Collections; +using System.Collections.Generic; +using Stary.Evo; +using Stary.Evo.Editor; +using UnityEditor; +using UnityEngine; + +[CustomEditor(typeof(HotfixMainResDomain))] +public class HotfixMainResDomainEditor : UnityEditor.Editor +{ + /// + /// 序列化属性,在OnEnable中获取 + /// + [HideInInspector] + private SerializedProperty projectInfo; + + private void OnEnable() + { + projectInfo = serializedObject.FindProperty("projectInfo"); + + } + + public override void OnInspectorGUI() + { + base.OnInspectorGUI(); + HotfixMainResDomain hotfixMainResDomain = (HotfixMainResDomain)target; + hotfixMainResDomain.projectInfo.projectPackageName = $"com.xosmo.{hotfixMainResDomain.projectInfo.projectCode}"; + } +} \ No newline at end of file diff --git a/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script/CommandSub.cs.meta b/Assets/00.StaryEvo/Editor/Entity/HotfixMainResDomainEditor.cs.meta similarity index 83% rename from Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script/CommandSub.cs.meta rename to Assets/00.StaryEvo/Editor/Entity/HotfixMainResDomainEditor.cs.meta index 8ca4dc7..710584b 100644 --- a/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script/CommandSub.cs.meta +++ b/Assets/00.StaryEvo/Editor/Entity/HotfixMainResDomainEditor.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: b07fd1086f5d247448c730438ab61e75 +guid: cb7e2ce39e1df99428ebf42ff0e04a19 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/00.StaryEvo/Editor/MarkAdressable/MarkAdressable.cs b/Assets/00.StaryEvo/Editor/MarkAdressable/MarkAdressable.cs index 6051d19..b695b98 100644 --- a/Assets/00.StaryEvo/Editor/MarkAdressable/MarkAdressable.cs +++ b/Assets/00.StaryEvo/Editor/MarkAdressable/MarkAdressable.cs @@ -1,8 +1,11 @@ using System; using System.Collections.Generic; using System.IO; + +#if HotUpdate using HybridCLR.Editor; using HybridCLR.Editor.Commands; +#endif using UnityEditor; using UnityEditor.U2D; using UnityEngine; @@ -23,23 +26,6 @@ namespace Stary.Evo.Editor } - // public static string SpriteRemotedAtlas - // { - // get { return Application.dataPath + "/AddressableRes/SpriteAtlas"; } - // } - - - //[MenuItem("Evo/Hotfix/BuildAll")] - public static void BuildAll() - { - PrebuildCommand.GenerateAll(); - Debug.Log("UnityEvo:Build【GenerateAll】完成"); - AddHotfixAddressableDll(); - Debug.Log("UnityEvo:Build【CopyHotfixAddressableDll】完成"); - AddMark(); - Debug.Log("UnityEvo:Build【MarkAsset】完成"); - } - //[MenuItem("Evo/Hotfix/Addressable")] public static void AddHotfixAddressableDll() @@ -72,6 +58,7 @@ namespace Stary.Evo.Editor private static void CopyDllHotUpdateAssembly(string domain, string target) { +#if HotUpdate //读取打包dll位置 string hotUpdateDir = $"{SettingsUtil.HybridCLRSettings.hotUpdateDllCompileOutputRootDir}/{EditorUserBuildSettings.activeBuildTarget}"; @@ -104,10 +91,12 @@ namespace Stary.Evo.Editor FileUtility.Copy(hotfixDllPathPdb, hotfixDllPathPdbTarget, true); } } +#endif } private static void CopyDllStrippedAOTDllOutputRootDir(string target) { +#if HotUpdate //读取打包dll位置 string hotUpdateDir = $"{SettingsUtil.HybridCLRSettings.strippedAOTDllOutputRootDir}/{EditorUserBuildSettings.activeBuildTarget}"; @@ -118,6 +107,7 @@ namespace Stary.Evo.Editor $"{target}/Dll/{EditorUserBuildSettings.activeBuildTarget}/{dll}.bytes"; FileUtility.Copy(hotfixDllPath, hotfixDllPathTarget, true); } +#endif } public static void AddMarkAll(List oneKeyBUildEntities) @@ -530,5 +520,6 @@ namespace Stary.Evo.Editor }; ShaderVariantCollector.Run(localSavePath,BuildAssetWindow.GetBuildPackageName(),1000, completedCallback); } + } } \ No newline at end of file diff --git a/Assets/00.StaryEvo/Runtime/PlayerSettings/HotfixMainResDomain.cs b/Assets/00.StaryEvo/Runtime/PlayerSettings/HotfixMainResDomain.cs index eb4faff..4bf3029 100644 --- a/Assets/00.StaryEvo/Runtime/PlayerSettings/HotfixMainResDomain.cs +++ b/Assets/00.StaryEvo/Runtime/PlayerSettings/HotfixMainResDomain.cs @@ -1,22 +1,40 @@ using System; +using Sirenix.OdinInspector; using UnityEngine; namespace Stary.Evo { - - [CreateAssetMenu(fileName = "HotfixMainResDomain", menuName = "Evo/Create HotfixMainResDomain")] public class HotfixMainResDomain : ScriptableObject { public HotfixMainResDomainEntity hotfixMainResDomainEntity; + public ProjectInfo projectInfo; } - + [Serializable] public class HotfixMainResDomainEntity { - public string ipconfig="http://192.168.31.100:5005/HotRefresh"; - public string mainDomainVersion =""; - public string username="UnityHot"; - public string password="Unity1234"; + public string ipconfig = "http://192.168.31.100:5005/HotRefresh"; + public string mainDomainVersion = ""; + public string username = "UnityHot"; + public string password = "Unity1234"; + } + [Serializable] + public class ProjectInfo + { + /// + /// 项目中文名称 + /// + public string projectName; + + /// + /// 项目代号 + /// + public string projectCode; + /// + /// 项目包名 + /// + [ReadOnly] + public string projectPackageName; } } \ No newline at end of file diff --git a/Assets/00.StaryEvo/~Samples/Runtime.meta b/Assets/00.StaryEvo/Runtime/loading.meta similarity index 77% rename from Assets/00.StaryEvo/~Samples/Runtime.meta rename to Assets/00.StaryEvo/Runtime/loading.meta index 08a8577..4424648 100644 --- a/Assets/00.StaryEvo/~Samples/Runtime.meta +++ b/Assets/00.StaryEvo/Runtime/loading.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 810a1400946cf2a4591b544ec7c6113d +guid: f731b06eebbbde74ea69563a66c3ae6b folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/00.StaryEvo/Runtime/loading/SplashScreen.cs b/Assets/00.StaryEvo/Runtime/loading/SplashScreen.cs new file mode 100644 index 0000000..11f8cb6 --- /dev/null +++ b/Assets/00.StaryEvo/Runtime/loading/SplashScreen.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Threading.Tasks; +using Cysharp.Threading.Tasks; +using UnityEngine; +using UnityEngine.SceneManagement; +using UnityEngine.UI; + +public class SplashScreen : MonoBehaviour +{ + private Image image; + + async void Start() + { + image = GetComponentInChildren(); + // 初始完全透明 + image.color = new Color(1, 1, 1, 0); + + // 渐显效果(2秒) + await Fade(0, 1, 0.5f); + + // 保持显示(原2秒等待) + await UniTask.Delay(TimeSpan.FromSeconds(1)); + + // 渐隐效果(1秒) + await Fade(1, 0, 0.5f); + + await SceneManager.LoadSceneAsync(1); + if (transform != null) + Destroy(gameObject); + } + + + private async UniTask Fade(float startAlpha, float endAlpha, float duration) + { + float elapsed = 0f; + while (elapsed < duration) + { + float alpha = Mathf.Lerp(startAlpha, endAlpha, elapsed / duration); + image.color = new Color(1, 1, 1, alpha); + elapsed += Time.deltaTime; + await UniTask.Yield(); + } + + image.color = new Color(1, 1, 1, endAlpha); + } +} \ No newline at end of file diff --git a/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script/CounterApp.cs.meta b/Assets/00.StaryEvo/Runtime/loading/SplashScreen.cs.meta similarity index 83% rename from Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script/CounterApp.cs.meta rename to Assets/00.StaryEvo/Runtime/loading/SplashScreen.cs.meta index 4e47fd8..9a4b7e3 100644 --- a/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script/CounterApp.cs.meta +++ b/Assets/00.StaryEvo/Runtime/loading/SplashScreen.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4b9e1b9962882b647b727dc4749d40dd +guid: eaccb6795ccb65c479e97450d3227af6 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/00.StaryEvo/~Samples/Runtime/CounterApp.meta b/Assets/00.StaryEvo/Samples~/SplashScreen/EvoScenes.meta similarity index 77% rename from Assets/00.StaryEvo/~Samples/Runtime/CounterApp.meta rename to Assets/00.StaryEvo/Samples~/SplashScreen/EvoScenes.meta index fdd3a08..12f45bb 100644 --- a/Assets/00.StaryEvo/~Samples/Runtime/CounterApp.meta +++ b/Assets/00.StaryEvo/Samples~/SplashScreen/EvoScenes.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: bf9eb356dc195004ea58a696dda5559e +guid: f9fe723e297f3aa4189255d2ba9c8392 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/00.StaryEvo/Samples~/SplashScreen/EvoScenes/Canvas.prefab b/Assets/00.StaryEvo/Samples~/SplashScreen/EvoScenes/Canvas.prefab new file mode 100644 index 0000000..58f2372 --- /dev/null +++ b/Assets/00.StaryEvo/Samples~/SplashScreen/EvoScenes/Canvas.prefab @@ -0,0 +1,174 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &408401849155147236 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7508565971128574473} + - component: {fileID: 3113898335757042942} + - component: {fileID: 4573574020091740314} + - component: {fileID: 7717858677675517226} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7508565971128574473 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 408401849155147236} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0.828} + m_LocalScale: {x: 0.0042, y: 0.0042, z: 0.0042} + m_ConstrainProportionsScale: 1 + m_Children: + - {fileID: 6632897685232509078} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0.133, y: -0.098} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!223 &3113898335757042942 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 408401849155147236} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 2 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_VertexColorAlwaysGammaSpace: 0 + m_AdditionalShaderChannelsFlag: 0 + m_UpdateRectTransformForStandalone: 0 + m_SortingLayerID: 0 + m_SortingOrder: 20 + m_TargetDisplay: 0 +--- !u!114 &4573574020091740314 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 408401849155147236} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 1 +--- !u!114 &7717858677675517226 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 408401849155147236} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eaccb6795ccb65c479e97450d3227af6, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &2194460266377447544 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6632897685232509078} + - component: {fileID: 7767856386255314419} + - component: {fileID: 181196217961718294} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6632897685232509078 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2194460266377447544} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} + m_ConstrainProportionsScale: 1 + m_Children: [] + m_Father: {fileID: 7508565971128574473} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 1920, y: 1080} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &7767856386255314419 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2194460266377447544} + m_CullTransparentMesh: 1 +--- !u!114 &181196217961718294 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2194460266377447544} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: ab3e5b442b3157a4499b698842523b92, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 diff --git a/Assets/00.StaryEvo/~Samples/Runtime/Event/TypeEventSystemExample.unity.meta b/Assets/00.StaryEvo/Samples~/SplashScreen/EvoScenes/Canvas.prefab.meta similarity index 63% rename from Assets/00.StaryEvo/~Samples/Runtime/Event/TypeEventSystemExample.unity.meta rename to Assets/00.StaryEvo/Samples~/SplashScreen/EvoScenes/Canvas.prefab.meta index 75db8f6..dc20f34 100644 --- a/Assets/00.StaryEvo/~Samples/Runtime/Event/TypeEventSystemExample.unity.meta +++ b/Assets/00.StaryEvo/Samples~/SplashScreen/EvoScenes/Canvas.prefab.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: 0cff87da169d7e44fba9383eb0a7a9c7 -DefaultImporter: +guid: 0b3ee65f4ceab0443ba637d4f4acbc68 +PrefabImporter: externalObjects: {} userData: assetBundleName: diff --git a/Assets/00.StaryEvo/Samples~/SplashScreen/EvoScenes/loading.unity b/Assets/00.StaryEvo/Samples~/SplashScreen/EvoScenes/loading.unity new file mode 100644 index 0000000..f67a66d --- /dev/null +++ b/Assets/00.StaryEvo/Samples~/SplashScreen/EvoScenes/loading.unity @@ -0,0 +1,686 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0.12731749, g: 0.13414757, b: 0.1210787, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 0} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 3 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + buildHeightMesh: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &394404790 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 394404791} + - component: {fileID: 394404797} + - component: {fileID: 394404796} + - component: {fileID: 394404795} + - component: {fileID: 394404794} + - component: {fileID: 394404793} + - component: {fileID: 394404792} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &394404791 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 394404790} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7117355850823243513} + m_Father: {fileID: 459117623} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &394404792 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 394404790} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 2 + m_RequiresOpaqueTextureOption: 2 + m_CameraType: 0 + m_Cameras: [] + m_RendererIndex: -1 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_VolumeTrigger: {fileID: 0} + m_VolumeFrameworkUpdateModeOption: 2 + m_RenderPostProcessing: 0 + m_Antialiasing: 0 + m_AntialiasingQuality: 2 + m_StopNaN: 0 + m_Dithering: 0 + m_ClearDepth: 1 + m_AllowXRRendering: 1 + m_AllowHDROutput: 1 + m_UseScreenCoordOverride: 0 + m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0} + m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_Version: 2 + m_TaaSettings: + quality: 3 + frameInfluence: 0.1 + jitterScale: 1 + mipBias: 0 + varianceClampScale: 0.9 + contrastAdaptiveSharpening: 0 +--- !u!114 &394404793 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 394404790} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c2fadf230d1919748a9aa21d40f74619, type: 3} + m_Name: + m_EditorClassIdentifier: + m_TrackingType: 0 + m_UpdateType: 0 + m_IgnoreTrackingState: 0 + m_PositionInput: + m_UseReference: 0 + m_Action: + m_Name: Position + m_Type: 0 + m_ExpectedControlType: Vector3 + m_Id: 6d61cbe8-767d-42f4-9dc7-f664d6d12f2c + m_Processors: + m_Interactions: + m_SingletonActionBindings: + - m_Name: + m_Id: 3e422fc6-df92-4a15-ad96-171d3f60ed8d + m_Path: /centerEyePosition + m_Interactions: + m_Processors: + m_Groups: + m_Action: Position + m_Flags: 0 + - m_Name: + m_Id: f97fd872-5aea-41b1-8e31-574cc6dcc92c + m_Path: /devicePosition + m_Interactions: + m_Processors: + m_Groups: + m_Action: Position + m_Flags: 0 + m_Flags: 0 + m_Reference: {fileID: 0} + m_RotationInput: + m_UseReference: 0 + m_Action: + m_Name: Rotation + m_Type: 0 + m_ExpectedControlType: Quaternion + m_Id: 2ecc7c4e-050c-4740-9654-21b6d18176ec + m_Processors: + m_Interactions: + m_SingletonActionBindings: + - m_Name: + m_Id: 88d29596-b12f-455e-a2a0-269593ff6cd4 + m_Path: /centerEyeRotation + m_Interactions: + m_Processors: + m_Groups: + m_Action: Rotation + m_Flags: 0 + - m_Name: + m_Id: 58052588-70e6-4194-a9e5-79c8e8be426f + m_Path: /deviceRotation + m_Interactions: + m_Processors: + m_Groups: + m_Action: Rotation + m_Flags: 0 + m_Flags: 0 + m_Reference: {fileID: 0} + m_TrackingStateInput: + m_UseReference: 0 + m_Action: + m_Name: Tracking State + m_Type: 0 + m_ExpectedControlType: Integer + m_Id: 6bbb8585-d5c2-45a0-9ec1-4bf19ec244b3 + m_Processors: + m_Interactions: + m_SingletonActionBindings: + - m_Name: + m_Id: 302aabe3-29c6-40fa-8339-c72b8b21d3e9 + m_Path: /trackingState + m_Interactions: + m_Processors: + m_Groups: + m_Action: Tracking State + m_Flags: 0 + m_Flags: 0 + m_Reference: {fileID: 0} + m_PositionAction: + m_Name: + m_Type: 0 + m_ExpectedControlType: + m_Id: 6d9a055e-0450-4cc9-842b-952dea46fc3a + m_Processors: + m_Interactions: + m_SingletonActionBindings: [] + m_Flags: 0 + m_RotationAction: + m_Name: + m_Type: 0 + m_ExpectedControlType: + m_Id: 5353ff1b-7953-4375-a89a-0301bf190f4b + m_Processors: + m_Interactions: + m_SingletonActionBindings: [] + m_Flags: 0 +--- !u!114 &394404794 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 394404790} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 816b289ef451e094f9ae174fb4cf8db0, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UseCustomMaterial: 0 + m_CustomMaterial: {fileID: 0} +--- !u!114 &394404795 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 394404790} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4966719baa26e4b0e8231a24d9bd491a, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FocusMode: -1 + m_LightEstimationMode: -1 + m_AutoFocus: 1 + m_LightEstimation: 0 + m_FacingDirection: 1 + m_RenderMode: 0 +--- !u!81 &394404796 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 394404790} + m_Enabled: 1 +--- !u!20 &394404797 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 394404790} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 2 + m_BackGroundColor: {r: 0, g: 0, b: 0, a: 1} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_FocalLength: 50 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.1 + far clip plane: 20 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!1 &459117622 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 459117623} + m_Layer: 0 + m_Name: Camera Offset + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &459117623 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 459117622} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 394404791} + m_Father: {fileID: 1237795371} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1035006624 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1035006626} + - component: {fileID: 1035006625} + m_Layer: 0 + m_Name: XR Interaction Manager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1035006625 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1035006624} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 83e4e6cca11330d4088d729ab4fc9d9f, type: 3} + m_Name: + m_EditorClassIdentifier: + m_StartingHoverFilters: [] + m_StartingSelectFilters: [] +--- !u!4 &1035006626 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1035006624} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1237795366 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1237795371} + - component: {fileID: 1237795370} + - component: {fileID: 1237795369} + - component: {fileID: 1237795368} + - component: {fileID: 1237795367} + m_Layer: 0 + m_Name: XR Origin (Mobile AR) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1237795367 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1237795366} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fa17d122634046b4a8e23048891fafc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RaycastPrefab: {fileID: 0} +--- !u!114 &1237795368 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1237795366} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e1760703bbd54c04488a8d10600262ab, type: 3} + m_Name: + m_EditorClassIdentifier: + m_PlanePrefab: {fileID: 0} + m_DetectionMode: -1 +--- !u!114 &1237795369 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1237795366} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 017c5e3933235514c9520e1dace2a4b2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ActionAssets: [] +--- !u!114 &1237795370 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1237795366} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e0cb9aa70a22847b5925ee5f067c10a9, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Camera: {fileID: 394404797} + m_OriginBaseGameObject: {fileID: 1237795366} + m_CameraFloorOffsetObject: {fileID: 459117622} + m_RequestedTrackingOriginMode: 1 + m_CameraYOffset: 0 +--- !u!4 &1237795371 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1237795366} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 459117623} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &7117355850823243512 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 394404791} + m_Modifications: + - target: {fileID: 408401849155147236, guid: 0b3ee65f4ceab0443ba637d4f4acbc68, type: 3} + propertyPath: m_Name + value: Canvas + objectReference: {fileID: 0} + - target: {fileID: 7508565971128574473, guid: 0b3ee65f4ceab0443ba637d4f4acbc68, type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 7508565971128574473, guid: 0b3ee65f4ceab0443ba637d4f4acbc68, type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 7508565971128574473, guid: 0b3ee65f4ceab0443ba637d4f4acbc68, type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7508565971128574473, guid: 0b3ee65f4ceab0443ba637d4f4acbc68, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7508565971128574473, guid: 0b3ee65f4ceab0443ba637d4f4acbc68, type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7508565971128574473, guid: 0b3ee65f4ceab0443ba637d4f4acbc68, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7508565971128574473, guid: 0b3ee65f4ceab0443ba637d4f4acbc68, type: 3} + propertyPath: m_SizeDelta.x + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 7508565971128574473, guid: 0b3ee65f4ceab0443ba637d4f4acbc68, type: 3} + propertyPath: m_SizeDelta.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 7508565971128574473, guid: 0b3ee65f4ceab0443ba637d4f4acbc68, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7508565971128574473, guid: 0b3ee65f4ceab0443ba637d4f4acbc68, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7508565971128574473, guid: 0b3ee65f4ceab0443ba637d4f4acbc68, type: 3} + propertyPath: m_LocalPosition.z + value: 0.828 + objectReference: {fileID: 0} + - target: {fileID: 7508565971128574473, guid: 0b3ee65f4ceab0443ba637d4f4acbc68, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7508565971128574473, guid: 0b3ee65f4ceab0443ba637d4f4acbc68, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7508565971128574473, guid: 0b3ee65f4ceab0443ba637d4f4acbc68, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7508565971128574473, guid: 0b3ee65f4ceab0443ba637d4f4acbc68, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7508565971128574473, guid: 0b3ee65f4ceab0443ba637d4f4acbc68, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0.133 + objectReference: {fileID: 0} + - target: {fileID: 7508565971128574473, guid: 0b3ee65f4ceab0443ba637d4f4acbc68, type: 3} + propertyPath: m_AnchoredPosition.y + value: -0.098 + objectReference: {fileID: 0} + - target: {fileID: 7508565971128574473, guid: 0b3ee65f4ceab0443ba637d4f4acbc68, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7508565971128574473, guid: 0b3ee65f4ceab0443ba637d4f4acbc68, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7508565971128574473, guid: 0b3ee65f4ceab0443ba637d4f4acbc68, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 0b3ee65f4ceab0443ba637d4f4acbc68, type: 3} +--- !u!224 &7117355850823243513 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 7508565971128574473, guid: 0b3ee65f4ceab0443ba637d4f4acbc68, type: 3} + m_PrefabInstance: {fileID: 7117355850823243512} + m_PrefabAsset: {fileID: 0} +--- !u!1660057539 &9223372036854775807 +SceneRoots: + m_ObjectHideFlags: 0 + m_Roots: + - {fileID: 1035006626} + - {fileID: 1237795371} diff --git a/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Sence/Counter.unity.meta b/Assets/00.StaryEvo/Samples~/SplashScreen/EvoScenes/loading.unity.meta similarity index 74% rename from Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Sence/Counter.unity.meta rename to Assets/00.StaryEvo/Samples~/SplashScreen/EvoScenes/loading.unity.meta index 5b4b6ad..c4f33f6 100644 --- a/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Sence/Counter.unity.meta +++ b/Assets/00.StaryEvo/Samples~/SplashScreen/EvoScenes/loading.unity.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: a98d5b4bbdf7a41428d28563f2282a7d +guid: 88d6c32a67b8891498813e0cf6008440 DefaultImporter: externalObjects: {} userData: diff --git a/Assets/00.StaryEvo/Samples~/SplashScreen/EvoScenes/logo.png b/Assets/00.StaryEvo/Samples~/SplashScreen/EvoScenes/logo.png new file mode 100644 index 0000000..829d510 Binary files /dev/null and b/Assets/00.StaryEvo/Samples~/SplashScreen/EvoScenes/logo.png differ diff --git a/Assets/00.StaryEvo/Samples~/SplashScreen/EvoScenes/logo.png.meta b/Assets/00.StaryEvo/Samples~/SplashScreen/EvoScenes/logo.png.meta new file mode 100644 index 0000000..ae26d5d --- /dev/null +++ b/Assets/00.StaryEvo/Samples~/SplashScreen/EvoScenes/logo.png.meta @@ -0,0 +1,127 @@ +fileFormatVersion: 2 +guid: ab3e5b442b3157a4499b698842523b92 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/00.StaryEvo/package.json b/Assets/00.StaryEvo/package.json index 94dba71..a42d7f2 100644 --- a/Assets/00.StaryEvo/package.json +++ b/Assets/00.StaryEvo/package.json @@ -1,6 +1,6 @@ { "name": "com.staryevo.main", - "version": "1.3.8", + "version": "1.3.9", "displayName": "00.StaryEvo", "description": "This is an Framework package(后台服务器版本,端口9527)", "unity": "2021.3", @@ -24,7 +24,12 @@ { "displayName": "Framework Example Scenes", "description": "", - "path": "Samples~" + "path": "Samples~/Test" + }, + { + "displayName": "Loading", + "description": "", + "path": "Samples~/SplashScreen" } ] } diff --git a/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script.meta b/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script.meta deleted file mode 100644 index 4c83796..0000000 --- a/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 3808b39e00871be43bda11114e415f3f -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script/AchievementSystem.cs b/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script/AchievementSystem.cs deleted file mode 100644 index cb30f36..0000000 --- a/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script/AchievementSystem.cs +++ /dev/null @@ -1,41 +0,0 @@ - -using UnityEngine; - -namespace Stary.Evo.Example.Counter -{ - public interface IAchievementSystem : ISystem - { - - } - - public class AchievementSystem : AbstractSystem, IAchievementSystem - { - public IArchitecture Architecture { get; set; } - - public override void Dispose() - { - - } - - protected override void OnInit() - { - var counterData = this.GetData(); - - var previousCount = counterData.Count.Value; - - counterData.Count.Register(newCount => - { - if (newCount >= 10 && previousCount < 10) - { - Debug.Log("解锁 10 次点击成就"); - } - else if (newCount >= 20 && previousCount < 20) - { - Debug.Log("解锁 20 次点击成就"); - } - - previousCount = newCount; - }); - } - } -} \ No newline at end of file diff --git a/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script/AchievementSystem.cs.meta b/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script/AchievementSystem.cs.meta deleted file mode 100644 index 3abcc58..0000000 --- a/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script/AchievementSystem.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: f241abf86b6647ea93571ad2f92c913a -timeCreated: 1624955512 \ No newline at end of file diff --git a/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script/CommandAnd.cs b/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script/CommandAnd.cs deleted file mode 100644 index 6745bc8..0000000 --- a/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script/CommandAnd.cs +++ /dev/null @@ -1,13 +0,0 @@ - - -namespace Stary.Evo.Example.Counter -{ - public class CommandAnd : AbstractCommand - { - protected override void OnExecute() - { - this.GetData().Count.Value++; - } - } - -} \ No newline at end of file diff --git a/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script/CommandSub.cs b/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script/CommandSub.cs deleted file mode 100644 index 7174862..0000000 --- a/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script/CommandSub.cs +++ /dev/null @@ -1,12 +0,0 @@ - - -namespace Stary.Evo.Example.Counter -{ - public class CommandSub : AbstractCommand - { - protected override void OnExecute() - { - CounterApp.Interface.GetData().Count.Value--; - } - } -} \ No newline at end of file diff --git a/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script/CounterApp.cs b/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script/CounterApp.cs deleted file mode 100644 index aaddb46..0000000 --- a/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script/CounterApp.cs +++ /dev/null @@ -1,15 +0,0 @@ - - -namespace Stary.Evo.Example.Counter -{ - public class CounterApp : Architecture - { - protected override void Init() - { - RegisterSystem(new AchievementSystem()); - RegisterData(new CounterData()); - RegisterUtility(new PlayerPrefsStorage()); - } - } - -} \ No newline at end of file diff --git a/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script/CounterModel.cs b/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script/CounterModel.cs deleted file mode 100644 index 0e3bdcf..0000000 --- a/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script/CounterModel.cs +++ /dev/null @@ -1,32 +0,0 @@ - - -namespace Stary.Evo.Example.Counter -{ - - public interface ICounterData : IData - { - BindableProperty Count { get; } - } - - public class CounterData : AbstractData, ICounterData - { - public override void Dispose() - { - - } - - protected override void OnInit() - { - var storage = this.GetUtility(); - Count.Value = storage.LoadInt("COUNTER_COUNT", 0); - - Count.Register( count => { storage.SaveInt("COUNTER_COUNT", count); }); - } - - public BindableProperty Count { get; } = new BindableProperty() - { - Value = 0 - }; - - } -} \ No newline at end of file diff --git a/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script/CounterModel.cs.meta b/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script/CounterModel.cs.meta deleted file mode 100644 index 2b9975e..0000000 --- a/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script/CounterModel.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 10c86a7a3c934d4796a6ec85a27f5a81 -timeCreated: 1624948547 \ No newline at end of file diff --git a/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script/CounterViewController.cs b/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script/CounterViewController.cs deleted file mode 100644 index f3a9d7e..0000000 --- a/Assets/00.StaryEvo/~Samples/Runtime/CounterApp/Script/CounterViewController.cs +++ /dev/null @@ -1,53 +0,0 @@ -using UnityEngine; -using UnityEngine.UI; - -namespace Stary.Evo.Example.Counter -{ - public class CounterViewController : MonoBehaviour, IController - { - private Text _countText; - private ICounterData mCounterData; - - void Start() - { - // 获取 - mCounterData = this.GetData(); - mCounterData.Count.Register(UpdateView); - _countText = transform.Find("CountText").GetComponent(); - _countText.text = mCounterData.Count.Value.ToString(); - transform.Find("ButtonAdd").GetComponent