diff --git a/Assets/GameFramework/Scripts/Editor/Inspector/BaseComponentInspector.cs b/Assets/GameFramework/Scripts/Editor/Inspector/BaseComponentInspector.cs index 65d3792..328d8be 100644 --- a/Assets/GameFramework/Scripts/Editor/Inspector/BaseComponentInspector.cs +++ b/Assets/GameFramework/Scripts/Editor/Inspector/BaseComponentInspector.cs @@ -104,7 +104,7 @@ namespace UnityGameFramework.Editor } EditorGUI.EndDisabledGroup(); - int frameRate = EditorGUILayout.IntSlider("Frame Rate", m_FrameRate.intValue, 1, 120); + int frameRate = EditorGUILayout.IntSlider("Frame Rate", m_FrameRate.intValue, 1, 240); if (frameRate != m_FrameRate.intValue) { if (EditorApplication.isPlaying) diff --git a/Assets/GameFramework/Scripts/Editor/Inspector/LocalizationComponentInspector.cs b/Assets/GameFramework/Scripts/Editor/Inspector/LocalizationComponentInspector.cs index 3bacb67..9892596 100644 --- a/Assets/GameFramework/Scripts/Editor/Inspector/LocalizationComponentInspector.cs +++ b/Assets/GameFramework/Scripts/Editor/Inspector/LocalizationComponentInspector.cs @@ -1,76 +1,76 @@ -//------------------------------------------------------------ -// Game Framework -// Copyright © 2013-2021 Jiang Yin. All rights reserved. -// Homepage: https://gameframework.cn/ -// Feedback: mailto:ellan@gameframework.cn -//------------------------------------------------------------ - -using UnityEditor; -using UnityGameFramework.Runtime; - -namespace UnityGameFramework.Editor -{ - [CustomEditor(typeof(LocalizationComponent))] - internal sealed class LocalizationComponentInspector : GameFrameworkInspector - { - private SerializedProperty m_EnableLoadDictionaryUpdateEvent = null; - private SerializedProperty m_EnableLoadDictionaryDependencyAssetEvent = null; - private SerializedProperty m_CachedBytesSize = null; - - private HelperInfo m_LocalizationHelperInfo = new HelperInfo("Localization"); - - public override void OnInspectorGUI() - { - base.OnInspectorGUI(); - - serializedObject.Update(); - - LocalizationComponent t = (LocalizationComponent)target; - - EditorGUI.BeginDisabledGroup(EditorApplication.isPlayingOrWillChangePlaymode); - { - EditorGUILayout.PropertyField(m_EnableLoadDictionaryUpdateEvent); - EditorGUILayout.PropertyField(m_EnableLoadDictionaryDependencyAssetEvent); - m_LocalizationHelperInfo.Draw(); - EditorGUILayout.PropertyField(m_CachedBytesSize); - } - EditorGUI.EndDisabledGroup(); - - if (EditorApplication.isPlaying && IsPrefabInHierarchy(t.gameObject)) - { - EditorGUILayout.LabelField("Language", t.Language.ToString()); - EditorGUILayout.LabelField("System Language", t.SystemLanguage.ToString()); - EditorGUILayout.LabelField("Dictionary Count", t.DictionaryCount.ToString()); - EditorGUILayout.LabelField("Cached Bytes Size", t.CachedBytesSize.ToString()); - } - - serializedObject.ApplyModifiedProperties(); - - Repaint(); - } - - protected override void OnCompileComplete() - { - base.OnCompileComplete(); - - RefreshTypeNames(); - } - - private void OnEnable() - { - m_EnableLoadDictionaryUpdateEvent = serializedObject.FindProperty("m_EnableLoadDictionaryUpdateEvent"); - m_EnableLoadDictionaryDependencyAssetEvent = serializedObject.FindProperty("m_EnableLoadDictionaryDependencyAssetEvent"); - m_CachedBytesSize = serializedObject.FindProperty("m_CachedBytesSize"); - - m_LocalizationHelperInfo.Init(serializedObject); - - RefreshTypeNames(); - } - - private void RefreshTypeNames() - { - m_LocalizationHelperInfo.Refresh(); - serializedObject.ApplyModifiedProperties(); - } - } -} +// //------------------------------------------------------------ +// // Game Framework +// // Copyright © 2013-2021 Jiang Yin. All rights reserved. +// // Homepage: https://gameframework.cn/ +// // Feedback: mailto:ellan@gameframework.cn +// //------------------------------------------------------------ +// +// using UnityEditor; +// using UnityGameFramework.Runtime; +// +// namespace UnityGameFramework.Editor +// { +// [CustomEditor(typeof(LocalizationComponent))] +// internal sealed class LocalizationComponentInspector : GameFrameworkInspector +// { +// private SerializedProperty m_EnableLoadDictionaryUpdateEvent = null; +// private SerializedProperty m_EnableLoadDictionaryDependencyAssetEvent = null; +// private SerializedProperty m_CachedBytesSize = null; +// +// private HelperInfo m_LocalizationHelperInfo = new HelperInfo("Localization"); +// +// public override void OnInspectorGUI() +// { +// base.OnInspectorGUI(); +// +// serializedObject.Update(); +// +// LocalizationComponent t = (LocalizationComponent)target; +// +// EditorGUI.BeginDisabledGroup(EditorApplication.isPlayingOrWillChangePlaymode); +// { +// EditorGUILayout.PropertyField(m_EnableLoadDictionaryUpdateEvent); +// EditorGUILayout.PropertyField(m_EnableLoadDictionaryDependencyAssetEvent); +// m_LocalizationHelperInfo.Draw(); +// EditorGUILayout.PropertyField(m_CachedBytesSize); +// } +// EditorGUI.EndDisabledGroup(); +// +// if (EditorApplication.isPlaying && IsPrefabInHierarchy(t.gameObject)) +// { +// EditorGUILayout.LabelField("Language", t.Language.ToString()); +// EditorGUILayout.LabelField("System Language", t.SystemLanguage.ToString()); +// EditorGUILayout.LabelField("Dictionary Count", t.DictionaryCount.ToString()); +// EditorGUILayout.LabelField("Cached Bytes Size", t.CachedBytesSize.ToString()); +// } +// +// serializedObject.ApplyModifiedProperties(); +// +// Repaint(); +// } +// +// protected override void OnCompileComplete() +// { +// base.OnCompileComplete(); +// +// RefreshTypeNames(); +// } +// +// private void OnEnable() +// { +// m_EnableLoadDictionaryUpdateEvent = serializedObject.FindProperty("m_EnableLoadDictionaryUpdateEvent"); +// m_EnableLoadDictionaryDependencyAssetEvent = serializedObject.FindProperty("m_EnableLoadDictionaryDependencyAssetEvent"); +// m_CachedBytesSize = serializedObject.FindProperty("m_CachedBytesSize"); +// +// m_LocalizationHelperInfo.Init(serializedObject); +// +// RefreshTypeNames(); +// } +// +// private void RefreshTypeNames() +// { +// m_LocalizationHelperInfo.Refresh(); +// serializedObject.ApplyModifiedProperties(); +// } +// } +// } diff --git a/Assets/GameMain/Configs/DefaultConfig.bytes b/Assets/GameMain/Configs/DefaultConfig.bytes deleted file mode 100644 index 0cb29fa..0000000 --- a/Assets/GameMain/Configs/DefaultConfig.bytes +++ /dev/null @@ -1,4 +0,0 @@ -Game.Id -Star Force -Scene.Menu1 -Scene.Main2 \ No newline at end of file diff --git a/Assets/GameMain/Configs/DefaultConfig.bytes.meta b/Assets/GameMain/Configs/DefaultConfig.bytes.meta deleted file mode 100644 index 5624dbb..0000000 --- a/Assets/GameMain/Configs/DefaultConfig.bytes.meta +++ /dev/null @@ -1,6 +0,0 @@ -fileFormatVersion: 2 -guid: 7fd11dc5d29076d469d414dec2818f11 -TextScriptImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/GameMain/Configs/DefaultConfig.txt b/Assets/GameMain/Configs/DefaultConfig.txt deleted file mode 100644 index b985132..0000000 Binary files a/Assets/GameMain/Configs/DefaultConfig.txt and /dev/null differ diff --git a/Assets/GameMain/Configs/DefaultConfig.txt.meta b/Assets/GameMain/Configs/DefaultConfig.txt.meta deleted file mode 100644 index 2fa1d84..0000000 --- a/Assets/GameMain/Configs/DefaultConfig.txt.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 44c8db52241385c45bbb14a1718f17bf -timeCreated: 1528026123 -licenseType: Pro -TextScriptImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/GameMain/Configs/ResourceBuilder.xml b/Assets/GameMain/Configs/ResourceBuilder.xml index 8e0b951..ef44c2c 100644 --- a/Assets/GameMain/Configs/ResourceBuilder.xml +++ b/Assets/GameMain/Configs/ResourceBuilder.xml @@ -2,14 +2,14 @@ - 0 + 1 1 1 UnityGameFramework.Runtime.DefaultCompressionHelper True False StarForce.Editor.StarForceBuildEventHandler - + D:/Learn/GameLearn/UnityProjects/Biography of Li Jian/AssetBundles True True True diff --git a/Assets/GameMain/Configs/ResourceCollection.xml b/Assets/GameMain/Configs/ResourceCollection.xml index b5987c3..6f7b7fd 100644 --- a/Assets/GameMain/Configs/ResourceCollection.xml +++ b/Assets/GameMain/Configs/ResourceCollection.xml @@ -2,23 +2,16 @@ - - - - - - - - + - + @@ -26,133 +19,58 @@ + - - - - - - - - - - + - - - - - - - - - - - - - - + + - - - - - - - - + - - - + + - - + + + - - - - - - - + - - - + - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - + - - + - - - - - - - - \ No newline at end of file diff --git a/Assets/GameMain/DataTables/Music.txt b/Assets/GameMain/DataTables/Music.txt deleted file mode 100644 index c94009f..0000000 --- a/Assets/GameMain/DataTables/Music.txt +++ /dev/null @@ -1,7 +0,0 @@ -# 音乐配置表 -# Id AssetName -# int string -# 音乐编号 策划备注 资源名称 - 1 菜单音乐 music_menu - 2 战斗音乐 music_background - 3 关于音乐 music_about diff --git a/Assets/GameMain/DataTables/Music.txt.meta b/Assets/GameMain/DataTables/Music.txt.meta deleted file mode 100644 index a4ca722..0000000 --- a/Assets/GameMain/DataTables/Music.txt.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 315e8ed2db27c254cb3366ff0793cd90 -timeCreated: 1528026124 -licenseType: Pro -TextScriptImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/GameMain/DataTables/Sound.txt b/Assets/GameMain/DataTables/Sound.txt deleted file mode 100644 index 0d22e6d..0000000 --- a/Assets/GameMain/DataTables/Sound.txt +++ /dev/null @@ -1,9 +0,0 @@ -# 声音配置表 -# Id AssetName Priority Loop Volume SpatialBlend MaxDistance -# int string int bool float float float -# 声音编号 策划备注 资源名称 优先级(默认0,128最高,-128最低) 是否循环 音量(0~1) 声音空间混合量(0为2D,1为3D,中间值混合效果) 声音最大距离 - 10000 玩家子弹 weapon_player 0 False 1 0 100 - 10001 敌人子弹 weapon_enemy 0 False 1 0 100 - 20000 玩家爆炸 explosion_player 0 False 1 0 100 - 20001 敌人爆炸 explosion_enemy 0 False 1 0 100 - 20002 小行星爆炸 explosion_asteroid 0 False 1 0 100 diff --git a/Assets/GameMain/DataTables/Sound.txt.meta b/Assets/GameMain/DataTables/Sound.txt.meta deleted file mode 100644 index 92830da..0000000 --- a/Assets/GameMain/DataTables/Sound.txt.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 372a8b1e52bedc64b9207b12d167afaa -timeCreated: 1528026124 -licenseType: Pro -TextScriptImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/GameMain/DataTables/UIForm.txt b/Assets/GameMain/DataTables/UIForm.txt index eccc80b..c97b02d 100644 --- a/Assets/GameMain/DataTables/UIForm.txt +++ b/Assets/GameMain/DataTables/UIForm.txt @@ -2,7 +2,7 @@ # Id AssetName UIGroupName AllowMultiInstance PauseCoveredUIForm # int string string bool bool # 界面编号 策划备注 资源名称 界面组名称 是否允许多个界面实例 是否暂停被其覆盖的界面 - 1 弹出框 DialogForm Default True True + 1 弹出框 DialogForm Dialog True True 100 主菜单 MenuForm Default False True 101 设置 SettingForm Default False True 102 关于 AboutForm Default False True diff --git a/Assets/GameMain/DataTables/UISound.txt b/Assets/GameMain/DataTables/UISound.txt deleted file mode 100644 index 87e1cd2..0000000 --- a/Assets/GameMain/DataTables/UISound.txt +++ /dev/null @@ -1,6 +0,0 @@ -# 声音配置表 -# Id AssetName Priority Volume -# int string int float -# 声音编号 策划备注 资源名称 优先级(默认0,128最高,-128最低) 音量(0~1) - 10000 选择音效 select 0 1 - 10001 点击音效 click 0 1 diff --git a/Assets/GameMain/DataTables/UISound.txt.meta b/Assets/GameMain/DataTables/UISound.txt.meta deleted file mode 100644 index b4f1b22..0000000 --- a/Assets/GameMain/DataTables/UISound.txt.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f2f97a713beae744181ba934f9c4113a -timeCreated: 1528026124 -licenseType: Pro -TextScriptImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/GameMain/Scripts/DataTable/DRMusic.cs b/Assets/GameMain/Scripts/DataTable/DRBGM.cs similarity index 76% rename from Assets/GameMain/Scripts/DataTable/DRMusic.cs rename to Assets/GameMain/Scripts/DataTable/DRBGM.cs index 83b2a31..efd97ec 100644 --- a/Assets/GameMain/Scripts/DataTable/DRMusic.cs +++ b/Assets/GameMain/Scripts/DataTable/DRBGM.cs @@ -1,17 +1,4 @@ -//------------------------------------------------------------ -// Game Framework -// Copyright © 2013-2021 Jiang Yin. All rights reserved. -// Homepage: https://gameframework.cn/ -// Feedback: mailto:ellan@gameframework.cn -//------------------------------------------------------------ -// 此文件由工具自动生成,请勿直接修改。 -// 生成时间:2021-06-16 21:54:35.591 -//------------------------------------------------------------ - -using GameFramework; -using System; -using System.Collections.Generic; -using System.IO; +using System.IO; using System.Text; using UnityEngine; using UnityGameFramework.Runtime; @@ -21,7 +8,7 @@ namespace DataTable /// /// 音乐配置表。 /// - public class DRMusic : DataRowBase + public class DRBGM : DataRowBase { private int m_Id = 0; diff --git a/Assets/GameMain/Scripts/DataTable/DRMusic.cs.meta b/Assets/GameMain/Scripts/DataTable/DRBGM.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/DataTable/DRMusic.cs.meta rename to Assets/GameMain/Scripts/DataTable/DRBGM.cs.meta diff --git a/Assets/GameMain/Scripts/DataTable/DRUISound.cs b/Assets/GameMain/Scripts/DataTable/DRSE.cs similarity index 94% rename from Assets/GameMain/Scripts/DataTable/DRUISound.cs rename to Assets/GameMain/Scripts/DataTable/DRSE.cs index db77bc7..82de2b7 100644 --- a/Assets/GameMain/Scripts/DataTable/DRUISound.cs +++ b/Assets/GameMain/Scripts/DataTable/DRSE.cs @@ -1,7 +1,4 @@ -using GameFramework; -using System; -using System.Collections.Generic; -using System.IO; +using System.IO; using System.Text; using UnityEngine; using UnityGameFramework.Runtime; @@ -11,7 +8,7 @@ namespace DataTable /// /// 声音配置表。 /// - public class DRUISound : DataRowBase + public class DRSE : DataRowBase { private int m_Id = 0; diff --git a/Assets/GameMain/Scripts/DataTable/DRUISound.cs.meta b/Assets/GameMain/Scripts/DataTable/DRSE.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/DataTable/DRUISound.cs.meta rename to Assets/GameMain/Scripts/DataTable/DRSE.cs.meta diff --git a/Assets/GameMain/Scripts/DataTable/DRSound.cs b/Assets/GameMain/Scripts/DataTable/DRSound.cs deleted file mode 100644 index fe12887..0000000 --- a/Assets/GameMain/Scripts/DataTable/DRSound.cs +++ /dev/null @@ -1,127 +0,0 @@ -using System.IO; -using System.Text; -using UnityGameFramework.Runtime; - -namespace DataTable -{ - /// - /// 声音配置表。 - /// - public class DRSound : DataRowBase - { - private int m_Id = 0; - - /// - /// 获取声音编号。 - /// - public override int Id - { - get - { - return m_Id; - } - } - - /// - /// 获取资源名称。 - /// - public string AssetName - { - get; - private set; - } - - /// - /// 获取优先级(默认0,128最高,-128最低)。 - /// - public int Priority - { - get; - private set; - } - - /// - /// 获取是否循环。 - /// - public bool Loop - { - get; - private set; - } - - /// - /// 获取音量(0~1)。 - /// - public float Volume - { - get; - private set; - } - - /// - /// 获取声音空间混合量(0为2D,1为3D,中间值混合效果)。 - /// - public float SpatialBlend - { - get; - private set; - } - - /// - /// 获取声音最大距离。 - /// - public float MaxDistance - { - get; - private set; - } - - public override bool ParseDataRow(string dataRowString, object userData) - { - string[] columnStrings = dataRowString.Split(DataTableExtension.DataSplitSeparators); - for (int i = 0; i < columnStrings.Length; i++) - { - columnStrings[i] = columnStrings[i].Trim(DataTableExtension.DataTrimSeparators); - } - - int index = 0; - index++; - m_Id = int.Parse(columnStrings[index++]); - index++; - AssetName = columnStrings[index++]; - Priority = int.Parse(columnStrings[index++]); - Loop = bool.Parse(columnStrings[index++]); - Volume = float.Parse(columnStrings[index++]); - SpatialBlend = float.Parse(columnStrings[index++]); - MaxDistance = float.Parse(columnStrings[index++]); - - GeneratePropertyArray(); - return true; - } - - public override bool ParseDataRow(byte[] dataRowBytes, int startIndex, int length, object userData) - { - using (MemoryStream memoryStream = new MemoryStream(dataRowBytes, startIndex, length, false)) - { - using (BinaryReader binaryReader = new BinaryReader(memoryStream, Encoding.UTF8)) - { - m_Id = binaryReader.Read7BitEncodedInt32(); - AssetName = binaryReader.ReadString(); - Priority = binaryReader.Read7BitEncodedInt32(); - Loop = binaryReader.ReadBoolean(); - Volume = binaryReader.ReadSingle(); - SpatialBlend = binaryReader.ReadSingle(); - MaxDistance = binaryReader.ReadSingle(); - } - } - - GeneratePropertyArray(); - return true; - } - - private void GeneratePropertyArray() - { - - } - } -} diff --git a/Assets/GameMain/Scripts/DataTable/DRSound.cs.meta b/Assets/GameMain/Scripts/DataTable/DRSound.cs.meta deleted file mode 100644 index daead29..0000000 --- a/Assets/GameMain/Scripts/DataTable/DRSound.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: fc0abcc42a26c844d91d422da22eb94d -timeCreated: 1528026147 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/GameMain/Scripts/Debugger.meta b/Assets/GameMain/Scripts/Debugger.meta deleted file mode 100644 index 87d4c25..0000000 --- a/Assets/GameMain/Scripts/Debugger.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 5479812568543994bbbcdbee6c42fce1 -folderAsset: yes -timeCreated: 1528026148 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/GameMain/Scripts/Debugger/ChangeLanguageDebuggerWindow.cs b/Assets/GameMain/Scripts/Debugger/ChangeLanguageDebuggerWindow.cs deleted file mode 100644 index b1632bb..0000000 --- a/Assets/GameMain/Scripts/Debugger/ChangeLanguageDebuggerWindow.cs +++ /dev/null @@ -1,86 +0,0 @@ -//------------------------------------------------------------ -// Game Framework -// Copyright © 2013-2021 Jiang Yin. All rights reserved. -// Homepage: https://gameframework.cn/ -// Feedback: mailto:ellan@gameframework.cn -//------------------------------------------------------------ - -using Definition; -using GameFramework.Debugger; -using GameFramework.Localization; -using UnityEngine; -using UnityGameFramework.Runtime; - -namespace StarForce -{ - public class ChangeLanguageDebuggerWindow : IDebuggerWindow - { - private Vector2 m_ScrollPosition = Vector2.zero; - private bool m_NeedRestart = false; - - public void Initialize(params object[] args) - { - } - - public void Shutdown() - { - } - - public void OnEnter() - { - } - - public void OnLeave() - { - } - - public void OnUpdate(float elapseSeconds, float realElapseSeconds) - { - if (m_NeedRestart) - { - m_NeedRestart = false; - UnityGameFramework.Runtime.GameEntry.Shutdown(ShutdownType.Restart); - } - } - - public void OnDraw() - { - m_ScrollPosition = GUILayout.BeginScrollView(m_ScrollPosition); - { - DrawSectionChangeLanguage(); - } - GUILayout.EndScrollView(); - } - - private void DrawSectionChangeLanguage() - { - GUILayout.Label("Change Language"); - GUILayout.BeginHorizontal("box"); - { - if (GUILayout.Button("Chinese Simplified", GUILayout.Height(30))) - { - GameEntry.Localization.Language = Language.ChineseSimplified; - SaveLanguage(); - } - if (GUILayout.Button("Chinese Traditional", GUILayout.Height(30))) - { - GameEntry.Localization.Language = Language.ChineseTraditional; - SaveLanguage(); - } - if (GUILayout.Button("English", GUILayout.Height(30))) - { - GameEntry.Localization.Language = Language.English; - SaveLanguage(); - } - } - GUILayout.EndHorizontal(); - } - - private void SaveLanguage() - { - GameEntry.Setting.SetString(Constant.Setting.Language, GameEntry.Localization.Language.ToString()); - GameEntry.Setting.Save(); - m_NeedRestart = true; - } - } -} diff --git a/Assets/GameMain/Scripts/Debugger/ChangeLanguageDebuggerWindow.cs.meta b/Assets/GameMain/Scripts/Debugger/ChangeLanguageDebuggerWindow.cs.meta deleted file mode 100644 index 5c0c046..0000000 --- a/Assets/GameMain/Scripts/Debugger/ChangeLanguageDebuggerWindow.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 278a7992e66d1ea4081597614f912f3d -timeCreated: 1528026148 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/GameMain/Scripts/Definition/Constant/Constant.Setting.cs b/Assets/GameMain/Scripts/Definition/Constant/Constant.Setting.cs index 1595633..60034d7 100644 --- a/Assets/GameMain/Scripts/Definition/Constant/Constant.Setting.cs +++ b/Assets/GameMain/Scripts/Definition/Constant/Constant.Setting.cs @@ -11,15 +11,18 @@ namespace Definition { public static class Setting { - public const string Language = "Setting.Language"; - public const string SoundGroupMuted = "Setting.{0}Muted"; - public const string SoundGroupVolume = "Setting.{0}Volume"; - public const string MusicMuted = "Setting.MusicMuted"; - public const string MusicVolume = "Setting.MusicVolume"; - public const string SoundMuted = "Setting.SoundMuted"; - public const string SoundVolume = "Setting.SoundVolume"; - public const string UISoundMuted = "Setting.UISoundMuted"; - public const string UISoundVolume = "Setting.UISoundVolume"; + public const string BGMVolume = "Setting.BGMVolume"; + public const string SEVolume = "Setting.SEVolume"; + + public const string AllowShake = "Setting.AllowShake"; + public const string AllowBlink = "Setting.AllowBlink"; + public const string DialogWindowAlpha = "Setting.DialogWindowAlpha"; + public const string DialogPlayingSpeed = "Setting.PlayingSpeed"; + + public const string ScreenSolution = "Setting.ScreenSolution"; + public const string ScreenWindow = "Setting.ScreenWindow"; + public const string VSync = "Setting.VSync"; + public const string AntiAliasing = "Setting.AntiAliasing"; } } } diff --git a/Assets/GameMain/Scripts/Definition/DataStruct/GameSetting.cs b/Assets/GameMain/Scripts/Definition/DataStruct/GameSetting.cs index 3f80782..76a4787 100644 --- a/Assets/GameMain/Scripts/Definition/DataStruct/GameSetting.cs +++ b/Assets/GameMain/Scripts/Definition/DataStruct/GameSetting.cs @@ -38,7 +38,7 @@ namespace Definition.DataStruct /// /// 对话播放速度 /// - public DialogPlayingSpeed PlayingSpeed { get; set; } + public DialogPlayingSpeed DialogPlayingSpeed { get; set; } #endregion @@ -47,7 +47,7 @@ namespace Definition.DataStruct /// /// 屏幕分辨率 /// - public ScreenSolutionType ScreenSolution { get; set; } + public ScreenResolutionType ScreenResolution { get; set; } /// /// 屏幕窗口模式 diff --git a/Assets/GameMain/Scripts/Definition/Enum/SettingEnums.cs b/Assets/GameMain/Scripts/Definition/Enum/SettingEnums.cs index 2884c13..0dd6218 100644 --- a/Assets/GameMain/Scripts/Definition/Enum/SettingEnums.cs +++ b/Assets/GameMain/Scripts/Definition/Enum/SettingEnums.cs @@ -15,14 +15,20 @@ namespace Definition.Enum High } - public enum ScreenSolutionType : byte + public enum ScreenResolutionType : byte { + _1280x720, + _1366x768, + _1600x900, + _1920x1080, + _2560x1440, + _2560x1600 } public enum ScreenWindowType : byte { - NoneBoard, - Window, - FullScreen + Borderless, + FullScreen, + Windowed, } } \ No newline at end of file diff --git a/Assets/GameMain/Scripts/Event/SettingSaveEventArgs.cs b/Assets/GameMain/Scripts/Event/SettingSaveEventArgs.cs index 8c89698..ecbef05 100644 --- a/Assets/GameMain/Scripts/Event/SettingSaveEventArgs.cs +++ b/Assets/GameMain/Scripts/Event/SettingSaveEventArgs.cs @@ -11,7 +11,7 @@ namespace Event public override int Id => EventId; - public GameSetting? GameSettings; + public GameSetting GameSettings; public SettingSaveEventArgs() { @@ -26,7 +26,7 @@ namespace Event public override void Clear() { - GameSettings = null; + GameSettings = new GameSetting(); } } } \ No newline at end of file diff --git a/Assets/GameMain/Scripts/Procedure/BuiltIn/ProcedureChangeScene.cs b/Assets/GameMain/Scripts/Procedure/BuiltIn/ProcedureChangeScene.cs index d36d85d..241d939 100644 --- a/Assets/GameMain/Scripts/Procedure/BuiltIn/ProcedureChangeScene.cs +++ b/Assets/GameMain/Scripts/Procedure/BuiltIn/ProcedureChangeScene.cs @@ -4,7 +4,7 @@ using Definition; using Definition.Enum; using GameFramework.DataTable; using GameFramework.Event; -using StarForce; +using Sound; using UnityGameFramework.Runtime; using ProcedureOwner = GameFramework.Fsm.IFsm; @@ -57,7 +57,8 @@ namespace Procedure return; } - GameEntry.Scene.LoadScene(AssetUtility.GetSceneAsset(drScene.AssetName), Constant.AssetPriority.SceneAsset, this); + GameEntry.Scene.LoadScene(AssetUtility.GetSceneAsset(drScene.AssetName), Constant.AssetPriority.SceneAsset, + this); _backgroundMusicId = drScene.BackgroundMusicId; } @@ -83,6 +84,9 @@ namespace Procedure SceneId sceneId = (SceneId)_nextSceneId; switch (sceneId) { + case SceneId.Menu: + ChangeState(procedureOwner); + break; case SceneId.GameplayA: ChangeState(procedureOwner); break; @@ -105,7 +109,7 @@ namespace Procedure if (_backgroundMusicId > 0) { - GameEntry.Sound.PlayMusic(_backgroundMusicId); + GameEntry.Sound.PlayBGM(_backgroundMusicId); } _isChangeSceneComplete = true; @@ -141,7 +145,8 @@ namespace Procedure return; } - Log.Info("Load scene '{0}' dependency asset '{1}', count '{2}/{3}'.", ne.SceneAssetName, ne.DependencyAssetName, ne.LoadedCount.ToString(), ne.TotalCount.ToString()); + Log.Info("Load scene '{0}' dependency asset '{1}', count '{2}/{3}'.", ne.SceneAssetName, + ne.DependencyAssetName, ne.LoadedCount.ToString(), ne.TotalCount.ToString()); } } -} +} \ No newline at end of file diff --git a/Assets/GameMain/Scripts/Procedure/BuiltIn/ProcedureLaunch.cs b/Assets/GameMain/Scripts/Procedure/BuiltIn/ProcedureLaunch.cs index f86746a..bf16cd8 100644 --- a/Assets/GameMain/Scripts/Procedure/BuiltIn/ProcedureLaunch.cs +++ b/Assets/GameMain/Scripts/Procedure/BuiltIn/ProcedureLaunch.cs @@ -1,7 +1,5 @@ -using GameFramework.Localization; -using System; -using Definition; -using StarForce; +using Definition; +using Sound; using UnityGameFramework.Runtime; using ProcedureOwner = GameFramework.Fsm.IFsm; @@ -17,19 +15,10 @@ namespace Procedure // 构建信息:发布版本时,把一些数据以 Json 的格式写入 Assets/GameMain/Configs/BuildInfo.txt,供游戏逻辑读取 GameEntry.BuiltinData.InitBuildInfo(); - - // 语言配置:设置当前使用的语言,如果不设置,则默认使用操作系统语言 - InitLanguageSettings(); - - // 变体配置:根据使用的语言,通知底层加载对应的资源变体 - InitCurrentVariant(); - - // 声音配置:根据用户配置数据,设置即将使用的声音选项 - InitSoundSettings(); - + // 默认字典:加载默认字典文件 Assets/GameMain/Configs/DefaultDictionary.xml // 此字典文件记录了资源更新前使用的各种语言的字符串,会随 App 一起发布,故不可更新 - GameEntry.BuiltinData.InitDefaultDictionary(); + // GameEntry.BuiltinData.InitDefaultDictionary(); } protected override void OnUpdate(ProcedureOwner procedureOwner, float elapseSeconds, float realElapseSeconds) @@ -39,89 +28,5 @@ namespace Procedure // 运行一帧即切换到 Splash 展示流程 ChangeState(procedureOwner); } - - private void InitLanguageSettings() - { - if (GameEntry.Base.EditorResourceMode && GameEntry.Base.EditorLanguage != Language.Unspecified) - { - // 编辑器资源模式直接使用 Inspector 上设置的语言 - return; - } - - Language language = GameEntry.Localization.Language; - if (GameEntry.Setting.HasSetting(Constant.Setting.Language)) - { - try - { - string languageString = GameEntry.Setting.GetString(Constant.Setting.Language); - language = (Language)Enum.Parse(typeof(Language), languageString); - } - catch - { - } - } - - if (language != Language.English - && language != Language.ChineseSimplified - && language != Language.ChineseTraditional - && language != Language.Korean) - { - // 若是暂不支持的语言,则使用英语 - language = Language.English; - - GameEntry.Setting.SetString(Constant.Setting.Language, language.ToString()); - GameEntry.Setting.Save(); - } - - GameEntry.Localization.Language = language; - Log.Info("Init language settings complete, current language is '{0}'.", language.ToString()); - } - - private void InitCurrentVariant() - { - if (GameEntry.Base.EditorResourceMode) - { - // 编辑器资源模式不使用 AssetBundle,也就没有变体了 - return; - } - - string currentVariant = null; - switch (GameEntry.Localization.Language) - { - case Language.English: - currentVariant = "en-us"; - break; - - case Language.ChineseSimplified: - currentVariant = "zh-cn"; - break; - - case Language.ChineseTraditional: - currentVariant = "zh-tw"; - break; - - case Language.Korean: - currentVariant = "ko-kr"; - break; - - default: - currentVariant = "zh-cn"; - break; - } - - GameEntry.Resource.SetCurrentVariant(currentVariant); - Log.Info("Init current variant complete."); - } - - private void InitSoundSettings() - { - GameEntry.Sound.Mute("Music", GameEntry.Setting.GetBool(Constant.Setting.MusicMuted, false)); - GameEntry.Sound.SetVolume("Music", GameEntry.Setting.GetFloat(Constant.Setting.MusicVolume, 0.3f)); - GameEntry.Sound.Mute("Sound", GameEntry.Setting.GetBool(Constant.Setting.SoundMuted, false)); - GameEntry.Sound.SetVolume("Sound", GameEntry.Setting.GetFloat(Constant.Setting.SoundVolume, 1f)); - GameEntry.Sound.Mute("UISound", GameEntry.Setting.GetBool(Constant.Setting.UISoundMuted, false)); - GameEntry.Sound.SetVolume("UISound", GameEntry.Setting.GetFloat(Constant.Setting.UISoundVolume, 1f)); - Log.Info("Init sound settings complete."); - } } } diff --git a/Assets/GameMain/Scripts/Procedure/BuiltIn/ProcedurePreload.cs b/Assets/GameMain/Scripts/Procedure/BuiltIn/ProcedurePreload.cs index dc16b94..0a96a28 100644 --- a/Assets/GameMain/Scripts/Procedure/BuiltIn/ProcedurePreload.cs +++ b/Assets/GameMain/Scripts/Procedure/BuiltIn/ProcedurePreload.cs @@ -1,14 +1,19 @@ -using GameFramework; +using System; +using GameFramework; using GameFramework.Event; using GameFramework.Resource; using System.Collections.Generic; +using System.Linq; using CustomUtility; using DataTable; using Definition; using Definition.Enum; +using Setting; +using Sound; using TMPro; using UI; using UnityEngine; +using UnityEngine.Rendering; using UnityGameFramework.Runtime; using ProcedureOwner = GameFramework.Fsm.IFsm; @@ -19,11 +24,10 @@ namespace Procedure public static readonly string[] DataTableNames = new string[] { "Entity", - "Music", + "BGM", "Scene", - "Sound", "UIForm", - "UISound", + "SE", "Dialog", "DialogLine" }; @@ -72,15 +76,12 @@ namespace Procedure } } - procedureOwner.SetData("NextSceneId", (int)SceneId.Main); + procedureOwner.SetData("NextSceneId", (int)SceneId.Menu); ChangeState(procedureOwner); } private void PreloadResources() { - // Preload configs - LoadConfig("DefaultConfig"); - // Preload data tables foreach (string dataTableName in DataTableNames) { @@ -88,18 +89,13 @@ namespace Procedure } // Preload dictionaries - LoadDictionary("Default"); + // LoadDictionary("Default"); // Preload fonts LoadFont("MainFont"); LoadTMPFont("MainTMPFont"); - } - private void LoadConfig(string configName) - { - string configAssetName = AssetUtility.GetConfigAsset(configName, false); - _loadedFlag.Add(configAssetName, false); - GameEntry.Config.ReadData(configAssetName, this); + LoadSetting(); } private void LoadDataTable(string dataTableName) @@ -152,6 +148,81 @@ namespace Procedure })); } + private void LoadSetting() + { + var setting = GameEntry.Setting.GetGameSetting(); + + GameEntry.Sound.SetVolume("BGM", setting.BGMVolume); + GameEntry.Sound.SetVolume("SE", setting.SEVolume); + + ScreenResolutionType resolution = setting.ScreenResolution; + int width = 0, height = 0; + switch (resolution) + { + case ScreenResolutionType._1280x720: + width = 1280; + height = 720; + break; + case ScreenResolutionType._1366x768: + width = 1366; + height = 768; + break; + case ScreenResolutionType._1600x900: + width = 1600; + height = 900; + break; + case ScreenResolutionType._1920x1080: + width = 1920; + height = 1080; + break; + case ScreenResolutionType._2560x1440: + width = 2560; + height = 1440; + break; + case ScreenResolutionType._2560x1600: + width = 2560; + height = 1600; + break; + default: + throw new ArgumentOutOfRangeException(); + } + + ScreenWindowType resolutionWindow = setting.ScreenWindow; + switch (resolutionWindow) + { + case ScreenWindowType.FullScreen: + Screen.SetResolution(width, height, FullScreenMode.ExclusiveFullScreen); + break; + case ScreenWindowType.Borderless: + Screen.SetResolution(width, height, FullScreenMode.FullScreenWindow); + break; + case ScreenWindowType.Windowed: + Screen.SetResolution(width, height, FullScreenMode.Windowed); + break; + default: + throw new ArgumentOutOfRangeException(); + } + + Application.targetFrameRate = -1; + QualitySettings.vSyncCount = setting.VSync ? 1 : 0; + if (setting.AntiAliasing) + { + foreach (var asset in GraphicsSettings.allConfiguredRenderPipelines) + { + if (asset.name == "URP-AntiAliasing") GraphicsSettings.renderPipelineAsset = asset; + } + } + else + { + foreach (var asset in GraphicsSettings.allConfiguredRenderPipelines) + { + if (asset.name == "URP-Normal") GraphicsSettings.renderPipelineAsset = asset; + } + } + } + + #region Event Hanlders + private void OnLoadConfigSuccess(object sender, GameEventArgs e) { LoadConfigSuccessEventArgs ne = (LoadConfigSuccessEventArgs)e; @@ -223,5 +294,7 @@ namespace Procedure Log.Error("Can not load dictionary '{0}' from '{1}' with error message '{2}'.", ne.DictionaryAssetName, ne.DictionaryAssetName, ne.ErrorMessage); } + + #endregion } } \ No newline at end of file diff --git a/Assets/GameMain/Scripts/Procedure/ProcedureMenu.cs b/Assets/GameMain/Scripts/Procedure/ProcedureMenu.cs index ee07e30..2ddc29c 100644 --- a/Assets/GameMain/Scripts/Procedure/ProcedureMenu.cs +++ b/Assets/GameMain/Scripts/Procedure/ProcedureMenu.cs @@ -1,6 +1,15 @@ +using System; +using Definition.DataStruct; +using Definition.Enum; +using Event; +using GameFramework.Event; using GameFramework.Fsm; using GameFramework.Procedure; +using Setting; +using Sound; using UI; +using UnityEngine; +using UnityEngine.Rendering; namespace Procedure @@ -11,18 +20,64 @@ namespace Procedure private MenuFormController _menuFormController; + private SettingFormController _settingFormController; + + private const string SettingPrefix = "Setting."; + + private void StartGame() + { + } + + private void LoadGame() + { + } + + private void OpenSettingForm() + { + if (_settingFormController == null) + { + _settingFormController = new SettingFormController(); + } + + var settingContext = new SettingFormContext + { + Setting = GameEntry.Setting.GetGameSetting() + }; + _settingFormController.OpenUI(settingContext); + } + + private void ExitGame() + { + Application.Quit(); + } + #region FSM protected override void OnEnter(IFsm procedureOwner) { base.OnEnter(procedureOwner); + var e = GameEntry.Event; + e.Subscribe(MenuStartEventArgs.EventId, MenuStart); + e.Subscribe(MenuContinueEventArgs.EventId, MenuContinue); + e.Subscribe(MenuSettingEventArgs.EventId, MenuSetting); + e.Subscribe(MenuExitEventArgs.EventId, MenuExit); + e.Subscribe(SettingSaveEventArgs.EventId, SettingSave); + + _menuFormController = new MenuFormController(); _menuFormController.OpenUI(new MenuFormContext()); } protected override void OnLeave(IFsm procedureOwner, bool isShutdown) { + var e = GameEntry.Event; + e.Unsubscribe(MenuStartEventArgs.EventId, MenuStart); + e.Unsubscribe(MenuContinueEventArgs.EventId, MenuContinue); + e.Unsubscribe(MenuSettingEventArgs.EventId, MenuSetting); + e.Unsubscribe(MenuExitEventArgs.EventId, MenuExit); + e.Unsubscribe(SettingSaveEventArgs.EventId, SettingSave); + base.OnLeave(procedureOwner, isShutdown); } @@ -33,5 +88,107 @@ namespace Procedure } #endregion + + #region Event Handlers + + private void MenuStart(object sender, GameEventArgs e) + { + if (!(e is MenuStartEventArgs)) return; + } + + private void MenuContinue(object sender, GameEventArgs e) + { + if (!(e is MenuContinueEventArgs)) return; + } + + private void MenuSetting(object sender, GameEventArgs e) + { + if (!(e is MenuSettingEventArgs)) return; + OpenSettingForm(); + } + + private void MenuExit(object sender, GameEventArgs e) + { + if (!(e is MenuExitEventArgs)) return; + ExitGame(); + } + + private void SettingSave(object sender, GameEventArgs e) + { + if (!(e is SettingSaveEventArgs args)) return; + + GameEntry.Sound.SetVolume("BGM", args.GameSettings.BGMVolume); + GameEntry.Sound.SetVolume("SE", args.GameSettings.SEVolume); + + ScreenResolutionType resolution = args.GameSettings.ScreenResolution; + int width = 0, height = 0; + switch (resolution) + { + case ScreenResolutionType._1280x720: + width = 1280; + height = 720; + break; + case ScreenResolutionType._1366x768: + width = 1366; + height = 768; + break; + case ScreenResolutionType._1600x900: + width = 1600; + height = 900; + break; + case ScreenResolutionType._1920x1080: + width = 1920; + height = 1080; + break; + case ScreenResolutionType._2560x1440: + width = 2560; + height = 1440; + break; + case ScreenResolutionType._2560x1600: + width = 2560; + height = 1600; + break; + default: + throw new ArgumentOutOfRangeException(); + } + + ScreenWindowType resolutionWindow = args.GameSettings.ScreenWindow; + switch (resolutionWindow) + { + case ScreenWindowType.FullScreen: + Screen.SetResolution(width, height, FullScreenMode.ExclusiveFullScreen); + break; + case ScreenWindowType.Borderless: + Screen.SetResolution(width, height, FullScreenMode.FullScreenWindow); + break; + case ScreenWindowType.Windowed: + Screen.SetResolution(width, height, FullScreenMode.Windowed); + break; + default: + throw new ArgumentOutOfRangeException(); + } + + if (args.GameSettings.AntiAliasing) + { + foreach (var asset in GraphicsSettings.allConfiguredRenderPipelines) + { + if (asset.name == "URP-AntiAliasing") GraphicsSettings.renderPipelineAsset = asset; + } + } + else + { + foreach (var asset in GraphicsSettings.allConfiguredRenderPipelines) + { + if (asset.name == "URP-Normal") GraphicsSettings.renderPipelineAsset = asset; + } + } + + Application.targetFrameRate = -1; + QualitySettings.vSyncCount = args.GameSettings.VSync ? 1 : 0; + + GameEntry.Setting.SaveSetting(args.GameSettings); + } + + #endregion } } \ No newline at end of file diff --git a/Assets/GameMain/Scripts/Sound/SoundExtension.cs b/Assets/GameMain/Scripts/Sound/SoundExtension.cs index d8fce21..1060b1b 100644 --- a/Assets/GameMain/Scripts/Sound/SoundExtension.cs +++ b/Assets/GameMain/Scripts/Sound/SoundExtension.cs @@ -1,33 +1,25 @@ -//------------------------------------------------------------ -// Game Framework -// Copyright © 2013-2021 Jiang Yin. All rights reserved. -// Homepage: https://gameframework.cn/ -// Feedback: mailto:ellan@gameframework.cn -//------------------------------------------------------------ - -using CustomUtility; +using CustomUtility; using DataTable; using Definition; using Entity; -using GameFramework; using GameFramework.DataTable; using GameFramework.Sound; using UnityGameFramework.Runtime; -namespace StarForce +namespace Sound { public static class SoundExtension { private const float FadeVolumeDuration = 1f; private static int? s_MusicSerialId = null; - public static int? PlayMusic(this SoundComponent soundComponent, int musicId, object userData = null) + public static int? PlayBGM(this SoundComponent soundComponent, int musicId, object userData = null) { soundComponent.StopMusic(); - IDataTable dtMusic = GameEntry.DataTable.GetDataTable(); - DRMusic drMusic = dtMusic.GetDataRow(musicId); - if (drMusic == null) + IDataTable dtMusic = GameEntry.DataTable.GetDataTable(); + DRBGM drBgm = dtMusic.GetDataRow(musicId); + if (drBgm == null) { Log.Warning("Can not load music '{0}' from data table.", musicId.ToString()); return null; @@ -39,7 +31,8 @@ namespace StarForce playSoundParams.VolumeInSoundGroup = 1f; playSoundParams.FadeInSeconds = FadeVolumeDuration; playSoundParams.SpatialBlend = 0f; - s_MusicSerialId = soundComponent.PlaySound(AssetUtility.GetMusicAsset(drMusic.AssetName), "Music", Constant.AssetPriority.MusicAsset, playSoundParams, null, userData); + s_MusicSerialId = soundComponent.PlaySound(AssetUtility.GetMusicAsset(drBgm.AssetName), "BGM", + Constant.AssetPriority.MusicAsset, playSoundParams, null, userData); return s_MusicSerialId; } @@ -54,28 +47,10 @@ namespace StarForce s_MusicSerialId = null; } - public static int? PlaySound(this SoundComponent soundComponent, int soundId, EntityBase bindingEntity = null, object userData = null) + public static int? PlaySE(this SoundComponent soundComponent, int uiSoundId, object userData = null) { - IDataTable dtSound = GameEntry.DataTable.GetDataTable(); - DRSound drSound = dtSound.GetDataRow(soundId); - if (drSound == null) - { - Log.Warning("Can not load sound '{0}' from data table.", soundId.ToString()); - return null; - } - - PlaySoundParams playSoundParams = PlaySoundParams.Create(); - playSoundParams.Priority = drSound.Priority; - playSoundParams.Loop = drSound.Loop; - playSoundParams.VolumeInSoundGroup = drSound.Volume; - playSoundParams.SpatialBlend = drSound.SpatialBlend; - return soundComponent.PlaySound(AssetUtility.GetSoundAsset(drSound.AssetName), "Sound", Constant.AssetPriority.SoundAsset, playSoundParams, bindingEntity != null ? bindingEntity.Entity : null, userData); - } - - public static int? PlayUISound(this SoundComponent soundComponent, int uiSoundId, object userData = null) - { - IDataTable dtUISound = GameEntry.DataTable.GetDataTable(); - DRUISound drUISound = dtUISound.GetDataRow(uiSoundId); + IDataTable dtUISound = GameEntry.DataTable.GetDataTable(); + DRSE drUISound = dtUISound.GetDataRow(uiSoundId); if (drUISound == null) { Log.Warning("Can not load UI sound '{0}' from data table.", uiSoundId.ToString()); @@ -87,46 +62,8 @@ namespace StarForce playSoundParams.Loop = false; playSoundParams.VolumeInSoundGroup = drUISound.Volume; playSoundParams.SpatialBlend = 0f; - return soundComponent.PlaySound(AssetUtility.GetUISoundAsset(drUISound.AssetName), "UISound", Constant.AssetPriority.UISoundAsset, playSoundParams, userData); - } - - public static bool IsMuted(this SoundComponent soundComponent, string soundGroupName) - { - if (string.IsNullOrEmpty(soundGroupName)) - { - Log.Warning("Sound group is invalid."); - return true; - } - - ISoundGroup soundGroup = soundComponent.GetSoundGroup(soundGroupName); - if (soundGroup == null) - { - Log.Warning("Sound group '{0}' is invalid.", soundGroupName); - return true; - } - - return soundGroup.Mute; - } - - public static void Mute(this SoundComponent soundComponent, string soundGroupName, bool mute) - { - if (string.IsNullOrEmpty(soundGroupName)) - { - Log.Warning("Sound group is invalid."); - return; - } - - ISoundGroup soundGroup = soundComponent.GetSoundGroup(soundGroupName); - if (soundGroup == null) - { - Log.Warning("Sound group '{0}' is invalid.", soundGroupName); - return; - } - - soundGroup.Mute = mute; - - GameEntry.Setting.SetBool(Utility.Text.Format(Constant.Setting.SoundGroupMuted, soundGroupName), mute); - GameEntry.Setting.Save(); + return soundComponent.PlaySound(AssetUtility.GetUISoundAsset(drUISound.AssetName), "SE", + Constant.AssetPriority.UISoundAsset, playSoundParams, userData); } public static float GetVolume(this SoundComponent soundComponent, string soundGroupName) @@ -164,8 +101,8 @@ namespace StarForce soundGroup.Volume = volume; - GameEntry.Setting.SetFloat(Utility.Text.Format(Constant.Setting.SoundGroupVolume, soundGroupName), volume); + GameEntry.Setting.SetFloat($"Setting.{soundGroup}Volume", volume); GameEntry.Setting.Save(); } } -} +} \ No newline at end of file diff --git a/Assets/GameMain/Scripts/UI/Controller/SettingFormController.cs b/Assets/GameMain/Scripts/UI/Controller/SettingFormController.cs index 080d92f..51045aa 100644 --- a/Assets/GameMain/Scripts/UI/Controller/SettingFormController.cs +++ b/Assets/GameMain/Scripts/UI/Controller/SettingFormController.cs @@ -25,6 +25,7 @@ namespace UI return null; } + context.Controller = this; _context = context; if (_settingForm != null) diff --git a/Assets/GameMain/Scripts/UI/UGuiForm.cs b/Assets/GameMain/Scripts/UI/UGuiForm.cs index 3254d11..c66f18f 100644 --- a/Assets/GameMain/Scripts/UI/UGuiForm.cs +++ b/Assets/GameMain/Scripts/UI/UGuiForm.cs @@ -1,13 +1,6 @@ -//------------------------------------------------------------ -// Game Framework -// Copyright © 2013-2021 Jiang Yin. All rights reserved. -// Homepage: https://gameframework.cn/ -// Feedback: mailto:ellan@gameframework.cn -//------------------------------------------------------------ - -using System.Collections; +using System.Collections; using System.Collections.Generic; -using StarForce; +using Sound; using TMPro; using UnityEngine; using UnityEngine.UI; @@ -51,7 +44,7 @@ namespace UI public void PlayUISound(int uiSoundId) { - GameEntry.Sound.PlayUISound(uiSoundId); + GameEntry.Sound.PlaySE(uiSoundId); } public static void SetMainFont(Font mainFont) @@ -108,10 +101,6 @@ namespace UI foreach (var text in tmp_texts) { text.font = _mainTMPFont; - if (!string.IsNullOrEmpty(text.text)) - { - text.text = GameEntry.Localization.GetString(text.text); - } } } @@ -125,10 +114,6 @@ namespace UI foreach (var text in texts) { text.font = _mainFont; - if (!string.IsNullOrEmpty(text.text)) - { - text.text = GameEntry.Localization.GetString(text.text); - } } } } diff --git a/Assets/GameMain/Scripts/UI/View/SettingForm.cs b/Assets/GameMain/Scripts/UI/View/SettingForm.cs index a39646c..9f5f607 100644 --- a/Assets/GameMain/Scripts/UI/View/SettingForm.cs +++ b/Assets/GameMain/Scripts/UI/View/SettingForm.cs @@ -46,15 +46,15 @@ namespace UI var setting = context.Setting; - _bgmVolumeSlider.value = setting.BGMVolume; - _seVolumeSlider.value = setting.SEVolume; + _bgmVolumeSlider.value = setting.BGMVolume * 4; + _seVolumeSlider.value = setting.SEVolume * 4; _allowBlinkGroup.SetValue(setting.AllowBlink); _allowShakeGroup.SetValue(setting.AllowShake); _dialogWindowAlpha.SetValue((int)setting.DialogWindowAlpha); - _playingSpeed.SetValue((int)setting.PlayingSpeed); + _playingSpeed.SetValue((int)setting.DialogPlayingSpeed); - _screenSolution.SetValue((int)setting.ScreenSolution); + _screenSolution.SetValue((int)setting.ScreenResolution); _screenWindow.SetValue((int)setting.ScreenWindow); _vSyncGroup.SetValue(setting.VSync); _antiAliasingGroup.SetValue(setting.AntiAliasing); @@ -77,15 +77,15 @@ namespace UI { var setting = new GameSetting { - BGMVolume = _bgmVolumeSlider.value, - SEVolume = _seVolumeSlider.value, + BGMVolume = _bgmVolumeSlider.value / 4, + SEVolume = _seVolumeSlider.value / 4, AllowShake = _allowShakeGroup.GetBoolValue(), AllowBlink = _allowBlinkGroup.GetBoolValue(), DialogWindowAlpha = (DialogWindowAlpha)_dialogWindowAlpha.GetIntValue(), - PlayingSpeed = (DialogPlayingSpeed)_playingSpeed.GetIntValue(), + DialogPlayingSpeed = (DialogPlayingSpeed)_playingSpeed.GetIntValue(), - ScreenSolution = (ScreenSolutionType)_screenSolution.GetIntValue(), + ScreenResolution = (ScreenResolutionType)_screenSolution.GetIntValue(), ScreenWindow = (ScreenWindowType)_screenWindow.GetIntValue(), VSync = _vSyncGroup.GetBoolValue(), AntiAliasing = _antiAliasingGroup.GetBoolValue() @@ -129,6 +129,7 @@ namespace UI { var setting = CollectSetting(); GameEntry.Event.Fire(this, SettingSaveEventArgs.Create(setting)); + _controller.CloseUI(); } } } \ No newline at end of file diff --git a/Assets/GameMain/UI/UIForms/SettingForm.prefab b/Assets/GameMain/UI/UIForms/SettingForm.prefab index 5000525..40ff7c5 100644 --- a/Assets/GameMain/UI/UIForms/SettingForm.prefab +++ b/Assets/GameMain/UI/UIForms/SettingForm.prefab @@ -4564,7 +4564,7 @@ GameObject: - component: {fileID: 5634799414351515039} - component: {fileID: 8849553200166011154} m_Layer: 5 - m_Name: ScreenSolution + m_Name: ScreenResolution m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/Assets/Launcher.unity b/Assets/Launcher.unity index c03dc56..df50412 100644 --- a/Assets/Launcher.unity +++ b/Assets/Launcher.unity @@ -288,7 +288,7 @@ MonoBehaviour: m_RequiresOpaqueTextureOption: 2 m_CameraType: 0 m_Cameras: [] - m_RendererIndex: -1 + m_RendererIndex: 0 m_VolumeLayerMask: serializedVersion: 2 m_Bits: 1 @@ -438,57 +438,61 @@ PrefabInstance: value: objectReference: {fileID: 11400000, guid: a4c1cc1e6676f0e48a527bad48941f98, type: 2} + - target: {fileID: 11402440, guid: adb3eb1c35fcff14f89fba7b05c9d71c, type: 3} + propertyPath: m_ActiveWindow + value: 0 + objectReference: {fileID: 0} - target: {fileID: 11405216, guid: adb3eb1c35fcff14f89fba7b05c9d71c, type: 3} propertyPath: m_EntranceProcedureTypeName value: Procedure.ProcedureLaunch objectReference: {fileID: 0} - target: {fileID: 11405216, guid: adb3eb1c35fcff14f89fba7b05c9d71c, type: 3} propertyPath: m_AvailableProcedureTypeNames.Array.size - value: 11 + value: 12 objectReference: {fileID: 0} - target: {fileID: 11405216, guid: adb3eb1c35fcff14f89fba7b05c9d71c, type: 3} propertyPath: m_AvailableProcedureTypeNames.Array.data[0] - value: Procedure.ProcedureCheckResources + value: Procedure.ProcedureChangeScene objectReference: {fileID: 0} - target: {fileID: 11405216, guid: adb3eb1c35fcff14f89fba7b05c9d71c, type: 3} propertyPath: m_AvailableProcedureTypeNames.Array.data[1] - value: Procedure.ProcedureCheckVersion + value: Procedure.ProcedureCheckResources objectReference: {fileID: 0} - target: {fileID: 11405216, guid: adb3eb1c35fcff14f89fba7b05c9d71c, type: 3} propertyPath: m_AvailableProcedureTypeNames.Array.data[2] - value: Procedure.ProcedureCombine + value: Procedure.ProcedureCheckVersion objectReference: {fileID: 0} - target: {fileID: 11405216, guid: adb3eb1c35fcff14f89fba7b05c9d71c, type: 3} propertyPath: m_AvailableProcedureTypeNames.Array.data[3] - value: Procedure.ProcedureInitResources + value: Procedure.ProcedureCombine objectReference: {fileID: 0} - target: {fileID: 11405216, guid: adb3eb1c35fcff14f89fba7b05c9d71c, type: 3} propertyPath: m_AvailableProcedureTypeNames.Array.data[4] - value: Procedure.ProcedureLaunch + value: Procedure.ProcedureInitResources objectReference: {fileID: 0} - target: {fileID: 11405216, guid: adb3eb1c35fcff14f89fba7b05c9d71c, type: 3} propertyPath: m_AvailableProcedureTypeNames.Array.data[5] - value: Procedure.ProcedureMenu + value: Procedure.ProcedureLaunch objectReference: {fileID: 0} - target: {fileID: 11405216, guid: adb3eb1c35fcff14f89fba7b05c9d71c, type: 3} propertyPath: m_AvailableProcedureTypeNames.Array.data[6] - value: Procedure.ProcedurePreload + value: Procedure.ProcedureMenu objectReference: {fileID: 0} - target: {fileID: 11405216, guid: adb3eb1c35fcff14f89fba7b05c9d71c, type: 3} propertyPath: m_AvailableProcedureTypeNames.Array.data[7] - value: Procedure.ProcedureSplash + value: Procedure.ProcedurePreload objectReference: {fileID: 0} - target: {fileID: 11405216, guid: adb3eb1c35fcff14f89fba7b05c9d71c, type: 3} propertyPath: m_AvailableProcedureTypeNames.Array.data[8] - value: Procedure.ProcedureUpdateResources + value: Procedure.ProcedureSplash objectReference: {fileID: 0} - target: {fileID: 11405216, guid: adb3eb1c35fcff14f89fba7b05c9d71c, type: 3} propertyPath: m_AvailableProcedureTypeNames.Array.data[9] - value: Procedure.ProcedureUpdateVersion + value: Procedure.ProcedureUpdateResources objectReference: {fileID: 0} - target: {fileID: 11405216, guid: adb3eb1c35fcff14f89fba7b05c9d71c, type: 3} propertyPath: m_AvailableProcedureTypeNames.Array.data[10] - value: Procedure.ProcedureVerifyResources + value: Procedure.ProcedureUpdateVersion objectReference: {fileID: 0} - target: {fileID: 11405216, guid: adb3eb1c35fcff14f89fba7b05c9d71c, type: 3} propertyPath: m_AvailableProcedureTypeNames.Array.data[11] @@ -509,15 +513,15 @@ PrefabInstance: type: 2} - target: {fileID: 11413340, guid: adb3eb1c35fcff14f89fba7b05c9d71c, type: 3} propertyPath: m_SoundGroups.Array.size - value: 3 + value: 2 objectReference: {fileID: 0} - target: {fileID: 11413340, guid: adb3eb1c35fcff14f89fba7b05c9d71c, type: 3} propertyPath: m_SoundGroups.Array.data[0].m_Name - value: Music + value: BGM objectReference: {fileID: 0} - target: {fileID: 11413340, guid: adb3eb1c35fcff14f89fba7b05c9d71c, type: 3} propertyPath: m_SoundGroups.Array.data[1].m_Name - value: Sound + value: SE objectReference: {fileID: 0} - target: {fileID: 11413340, guid: adb3eb1c35fcff14f89fba7b05c9d71c, type: 3} propertyPath: m_SoundGroups.Array.data[2].m_Name @@ -589,7 +593,7 @@ PrefabInstance: objectReference: {fileID: 934951765} - target: {fileID: 11454530, guid: adb3eb1c35fcff14f89fba7b05c9d71c, type: 3} propertyPath: m_UIGroups.Array.size - value: 1 + value: 2 objectReference: {fileID: 0} - target: {fileID: 11454530, guid: adb3eb1c35fcff14f89fba7b05c9d71c, type: 3} propertyPath: m_UIGroupHelperTypeName @@ -601,7 +605,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 11454530, guid: adb3eb1c35fcff14f89fba7b05c9d71c, type: 3} propertyPath: m_UIGroups.Array.data[1].m_Name - value: Player + value: Dialog objectReference: {fileID: 0} - target: {fileID: 11454530, guid: adb3eb1c35fcff14f89fba7b05c9d71c, type: 3} propertyPath: m_UIGroups.Array.data[0].m_Depth @@ -609,6 +613,10 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 11454530, guid: adb3eb1c35fcff14f89fba7b05c9d71c, type: 3} propertyPath: m_UIGroups.Array.data[1].m_Depth + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 11461470, guid: adb3eb1c35fcff14f89fba7b05c9d71c, type: 3} + propertyPath: m_Enabled value: 0 objectReference: {fileID: 0} - target: {fileID: 11461470, guid: adb3eb1c35fcff14f89fba7b05c9d71c, type: 3} @@ -769,11 +777,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 11497722, guid: adb3eb1c35fcff14f89fba7b05c9d71c, type: 3} propertyPath: m_ResourceMode - value: 2 + value: 1 objectReference: {fileID: 0} - target: {fileID: 11499388, guid: adb3eb1c35fcff14f89fba7b05c9d71c, type: 3} propertyPath: m_FrameRate - value: 60 + value: 240 objectReference: {fileID: 0} - target: {fileID: 11499388, guid: adb3eb1c35fcff14f89fba7b05c9d71c, type: 3} propertyPath: m_EditorLanguage @@ -785,7 +793,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 11499388, guid: adb3eb1c35fcff14f89fba7b05c9d71c, type: 3} propertyPath: m_EditorResourceMode - value: 1 + value: 0 objectReference: {fileID: 0} - target: {fileID: 11499388, guid: adb3eb1c35fcff14f89fba7b05c9d71c, type: 3} propertyPath: m_JsonHelperTypeName @@ -1054,7 +1062,7 @@ Canvas: m_RenderMode: 0 m_Camera: {fileID: 0} m_PlaneDistance: 100 - m_PixelPerfect: 0 + m_PixelPerfect: 1 m_ReceivesEvents: 1 m_OverrideSorting: 0 m_OverridePixelPerfect: 0 diff --git a/Assets/Settings/URP-Balanced-Renderer.asset b/Assets/Settings/URP-Balanced-Renderer.asset deleted file mode 100644 index 20bd4d4..0000000 --- a/Assets/Settings/URP-Balanced-Renderer.asset +++ /dev/null @@ -1,76 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &-1878332245247344467 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f62c9c65cf3354c93be831c8bc075510, type: 3} - m_Name: SSAO - m_EditorClassIdentifier: - m_Active: 1 - m_Shader: {fileID: 0} - m_Settings: - Downsample: 1 - AfterOpaque: 0 - Source: 0 - NormalSamples: 0 - Intensity: 0.5 - DirectLightingStrength: 0.25 - Radius: 0.25 - SampleCount: 4 ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3} - m_Name: URP-Balanced-Renderer - m_EditorClassIdentifier: - debugShaders: - debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7, - type: 3} - m_RendererFeatures: - - {fileID: -1878332245247344467} - m_RendererFeatureMap: adc0de57c6d2eee5 - m_UseNativeRenderPass: 0 - postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2} - shaders: - blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3} - copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3} - screenSpaceShadowPS: {fileID: 0} - samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3} - stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3} - fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3} - materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3} - coreBlitPS: {fileID: 0} - coreBlitColorAndDepthPS: {fileID: 0} - cameraMotionVector: {fileID: 0} - objectMotionVector: {fileID: 0} - m_OpaqueLayerMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_TransparentLayerMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_DefaultStencilState: - overrideStencilState: 0 - stencilReference: 0 - stencilCompareFunction: 8 - passOperation: 2 - failOperation: 0 - zFailOperation: 0 - m_ShadowTransparentReceive: 1 - m_RenderingMode: 0 - m_DepthPrimingMode: 0 - m_AccurateGbufferNormals: 0 - m_ClusteredRendering: 0 - m_TileSize: 32 diff --git a/Assets/Settings/URP-Balanced-Renderer.asset.meta b/Assets/Settings/URP-Balanced-Renderer.asset.meta deleted file mode 100644 index 8fa7f17..0000000 --- a/Assets/Settings/URP-Balanced-Renderer.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: e634585d5c4544dd297acaee93dc2beb -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Settings/URP-Balanced.asset b/Assets/Settings/URP-Balanced.asset deleted file mode 100644 index 65bbfc8..0000000 --- a/Assets/Settings/URP-Balanced.asset +++ /dev/null @@ -1,114 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3} - m_Name: URP-Balanced - m_EditorClassIdentifier: - k_AssetVersion: 11 - k_AssetPreviousVersion: 11 - m_RendererType: 1 - m_RendererData: {fileID: 0} - m_RendererDataList: - - {fileID: 11400000, guid: e634585d5c4544dd297acaee93dc2beb, type: 2} - m_DefaultRendererIndex: 0 - m_RequireDepthTexture: 0 - m_RequireOpaqueTexture: 0 - m_OpaqueDownsampling: 1 - m_SupportsTerrainHoles: 1 - m_SupportsHDR: 1 - m_HDRColorBufferPrecision: 0 - m_MSAA: 1 - m_RenderScale: 1 - m_UpscalingFilter: 0 - m_FsrOverrideSharpness: 0 - m_FsrSharpness: 0.92 - m_EnableLODCrossFade: 1 - m_LODCrossFadeDitheringType: 1 - m_ShEvalMode: 0 - m_MainLightRenderingMode: 1 - m_MainLightShadowsSupported: 1 - m_MainLightShadowmapResolution: 1024 - m_AdditionalLightsRenderingMode: 1 - m_AdditionalLightsPerObjectLimit: 2 - m_AdditionalLightShadowsSupported: 0 - m_AdditionalLightsShadowmapResolution: 512 - m_AdditionalLightsShadowResolutionTierLow: 128 - m_AdditionalLightsShadowResolutionTierMedium: 256 - m_AdditionalLightsShadowResolutionTierHigh: 512 - m_ReflectionProbeBlending: 0 - m_ReflectionProbeBoxProjection: 0 - m_ShadowDistance: 50 - m_ShadowCascadeCount: 1 - m_Cascade2Split: 0.25 - m_Cascade3Split: {x: 0.1, y: 0.3} - m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467} - m_CascadeBorder: 0.1 - m_ShadowDepthBias: 1 - m_ShadowNormalBias: 1 - m_AnyShadowsSupported: 1 - m_SoftShadowsSupported: 1 - m_ConservativeEnclosingSphere: 0 - m_NumIterationsEnclosingSphere: 64 - m_SoftShadowQuality: 2 - m_AdditionalLightsCookieResolution: 512 - m_AdditionalLightsCookieFormat: 1 - m_UseSRPBatcher: 1 - m_SupportsDynamicBatching: 0 - m_MixedLightingSupported: 1 - m_SupportsLightCookies: 1 - m_SupportsLightLayers: 0 - m_DebugLevel: 0 - m_StoreActionsOptimization: 0 - m_EnableRenderGraph: 0 - m_UseAdaptivePerformance: 1 - m_ColorGradingMode: 0 - m_ColorGradingLutSize: 32 - m_UseFastSRGBLinearConversion: 0 - m_SupportDataDrivenLensFlare: 1 - m_ShadowType: 1 - m_LocalShadowsSupported: 0 - m_LocalShadowsAtlasResolution: 256 - m_MaxPixelLights: 0 - m_ShadowAtlasResolution: 256 - m_VolumeFrameworkUpdateMode: 0 - m_Textures: - blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3} - bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3} - m_PrefilteringModeMainLightShadows: 1 - m_PrefilteringModeAdditionalLight: 4 - m_PrefilteringModeAdditionalLightShadows: 1 - m_PrefilterXRKeywords: 0 - m_PrefilteringModeForwardPlus: 1 - m_PrefilteringModeDeferredRendering: 1 - m_PrefilteringModeScreenSpaceOcclusion: 1 - m_PrefilterDebugKeywords: 0 - m_PrefilterWriteRenderingLayers: 0 - m_PrefilterHDROutput: 0 - m_PrefilterSSAODepthNormals: 0 - m_PrefilterSSAOSourceDepthLow: 0 - m_PrefilterSSAOSourceDepthMedium: 0 - m_PrefilterSSAOSourceDepthHigh: 0 - m_PrefilterSSAOInterleaved: 0 - m_PrefilterSSAOBlueNoise: 0 - m_PrefilterSSAOSampleCountLow: 0 - m_PrefilterSSAOSampleCountMedium: 0 - m_PrefilterSSAOSampleCountHigh: 0 - m_PrefilterDBufferMRT1: 0 - m_PrefilterDBufferMRT2: 0 - m_PrefilterDBufferMRT3: 0 - m_PrefilterSoftShadowsQualityLow: 0 - m_PrefilterSoftShadowsQualityMedium: 0 - m_PrefilterSoftShadowsQualityHigh: 0 - m_PrefilterSoftShadows: 0 - m_PrefilterScreenCoord: 0 - m_PrefilterNativeRenderPass: 0 - m_ShaderVariantLogLevel: 0 - m_ShadowCascades: 0 diff --git a/Assets/Settings/URP-Balanced.asset.meta b/Assets/Settings/URP-Balanced.asset.meta deleted file mode 100644 index f524db0..0000000 --- a/Assets/Settings/URP-Balanced.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: e1260c1148f6143b28bae5ace5e9c5d1 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Settings/URP-HighFidelity-Renderer.asset b/Assets/Settings/URP-HighFidelity-Renderer.asset deleted file mode 100644 index 4f662f3..0000000 --- a/Assets/Settings/URP-HighFidelity-Renderer.asset +++ /dev/null @@ -1,104 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &-1878332245247344467 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f62c9c65cf3354c93be831c8bc075510, type: 3} - m_Name: SSAO - m_EditorClassIdentifier: - m_Active: 1 - m_Settings: - AOMethod: 1 - Downsample: 0 - AfterOpaque: 0 - Source: 1 - NormalSamples: 1 - Intensity: 0.5 - DirectLightingStrength: 0.25 - Radius: 0.25 - Samples: 0 - BlurQuality: 0 - Falloff: 100 - SampleCount: -1 - m_BlueNoise256Textures: - - {fileID: 2800000, guid: 36f118343fc974119bee3d09e2111500, type: 3} - - {fileID: 2800000, guid: 4b7b083e6b6734e8bb2838b0b50a0bc8, type: 3} - - {fileID: 2800000, guid: c06cc21c692f94f5fb5206247191eeee, type: 3} - - {fileID: 2800000, guid: cb76dd40fa7654f9587f6a344f125c9a, type: 3} - - {fileID: 2800000, guid: e32226222ff144b24bf3a5a451de54bc, type: 3} - - {fileID: 2800000, guid: 3302065f671a8450b82c9ddf07426f3a, type: 3} - - {fileID: 2800000, guid: 56a77a3e8d64f47b6afe9e3c95cb57d5, type: 3} - m_Shader: {fileID: 4800000, guid: 0849e84e3d62649e8882e9d6f056a017, type: 3} ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3} - m_Name: URP-HighFidelity-Renderer - m_EditorClassIdentifier: - debugShaders: - debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7, - type: 3} - hdrDebugViewPS: {fileID: 4800000, guid: 573620ae32aec764abd4d728906d2587, type: 3} - m_RendererFeatures: - - {fileID: -1878332245247344467} - m_RendererFeatureMap: adc0de57c6d2eee5 - m_UseNativeRenderPass: 0 - postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2} - xrSystemData: {fileID: 11400000, guid: 60e1133243b97e347b653163a8c01b64, type: 2} - shaders: - blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3} - copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3} - screenSpaceShadowPS: {fileID: 0} - samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3} - stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3} - fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3} - fallbackLoadingPS: {fileID: 4800000, guid: 7f888aff2ac86494babad1c2c5daeee2, type: 3} - materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3} - coreBlitPS: {fileID: 4800000, guid: 93446b5c5339d4f00b85c159e1159b7c, type: 3} - coreBlitColorAndDepthPS: {fileID: 4800000, guid: d104b2fc1ca6445babb8e90b0758136b, - type: 3} - blitHDROverlay: {fileID: 4800000, guid: a89bee29cffa951418fc1e2da94d1959, type: 3} - cameraMotionVector: {fileID: 4800000, guid: c56b7e0d4c7cb484e959caeeedae9bbf, - type: 3} - objectMotionVector: {fileID: 4800000, guid: 7b3ede40266cd49a395def176e1bc486, - type: 3} - dataDrivenLensFlare: {fileID: 4800000, guid: 6cda457ac28612740adb23da5d39ea92, - type: 3} - terrainDetailLitPS: {fileID: 4800000, guid: f6783ab646d374f94b199774402a5144, - type: 3} - terrainDetailGrassPS: {fileID: 4800000, guid: e507fdfead5ca47e8b9a768b51c291a1, - type: 3} - terrainDetailGrassBillboardPS: {fileID: 4800000, guid: 29868e73b638e48ca99a19ea58c48d90, - type: 3} - m_AssetVersion: 2 - m_OpaqueLayerMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_TransparentLayerMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_DefaultStencilState: - overrideStencilState: 0 - stencilReference: 0 - stencilCompareFunction: 8 - passOperation: 2 - failOperation: 0 - zFailOperation: 0 - m_ShadowTransparentReceive: 1 - m_RenderingMode: 0 - m_DepthPrimingMode: 0 - m_CopyDepthMode: 0 - m_AccurateGbufferNormals: 0 - m_IntermediateTextureMode: 1 diff --git a/Assets/Settings/URP-HighFidelity-Renderer.asset.meta b/Assets/Settings/URP-HighFidelity-Renderer.asset.meta deleted file mode 100644 index bcdff02..0000000 --- a/Assets/Settings/URP-HighFidelity-Renderer.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c40be3174f62c4acf8c1216858c64956 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Settings/URP-HighFidelity.asset b/Assets/Settings/URP-HighFidelity.asset deleted file mode 100644 index d526597..0000000 --- a/Assets/Settings/URP-HighFidelity.asset +++ /dev/null @@ -1,114 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3} - m_Name: URP-HighFidelity - m_EditorClassIdentifier: - k_AssetVersion: 11 - k_AssetPreviousVersion: 11 - m_RendererType: 1 - m_RendererData: {fileID: 0} - m_RendererDataList: - - {fileID: 11400000, guid: c40be3174f62c4acf8c1216858c64956, type: 2} - m_DefaultRendererIndex: 0 - m_RequireDepthTexture: 0 - m_RequireOpaqueTexture: 0 - m_OpaqueDownsampling: 1 - m_SupportsTerrainHoles: 1 - m_SupportsHDR: 1 - m_HDRColorBufferPrecision: 0 - m_MSAA: 4 - m_RenderScale: 1 - m_UpscalingFilter: 0 - m_FsrOverrideSharpness: 0 - m_FsrSharpness: 0.92 - m_EnableLODCrossFade: 1 - m_LODCrossFadeDitheringType: 1 - m_ShEvalMode: 0 - m_MainLightRenderingMode: 1 - m_MainLightShadowsSupported: 1 - m_MainLightShadowmapResolution: 4096 - m_AdditionalLightsRenderingMode: 1 - m_AdditionalLightsPerObjectLimit: 8 - m_AdditionalLightShadowsSupported: 1 - m_AdditionalLightsShadowmapResolution: 4096 - m_AdditionalLightsShadowResolutionTierLow: 128 - m_AdditionalLightsShadowResolutionTierMedium: 256 - m_AdditionalLightsShadowResolutionTierHigh: 512 - m_ReflectionProbeBlending: 1 - m_ReflectionProbeBoxProjection: 1 - m_ShadowDistance: 150 - m_ShadowCascadeCount: 4 - m_Cascade2Split: 0.25 - m_Cascade3Split: {x: 0.1, y: 0.3} - m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467} - m_CascadeBorder: 0.1 - m_ShadowDepthBias: 1 - m_ShadowNormalBias: 1 - m_AnyShadowsSupported: 1 - m_SoftShadowsSupported: 1 - m_ConservativeEnclosingSphere: 0 - m_NumIterationsEnclosingSphere: 64 - m_SoftShadowQuality: 2 - m_AdditionalLightsCookieResolution: 4096 - m_AdditionalLightsCookieFormat: 4 - m_UseSRPBatcher: 1 - m_SupportsDynamicBatching: 0 - m_MixedLightingSupported: 1 - m_SupportsLightCookies: 1 - m_SupportsLightLayers: 0 - m_DebugLevel: 0 - m_StoreActionsOptimization: 0 - m_EnableRenderGraph: 0 - m_UseAdaptivePerformance: 1 - m_ColorGradingMode: 0 - m_ColorGradingLutSize: 32 - m_UseFastSRGBLinearConversion: 0 - m_SupportDataDrivenLensFlare: 1 - m_ShadowType: 1 - m_LocalShadowsSupported: 0 - m_LocalShadowsAtlasResolution: 256 - m_MaxPixelLights: 0 - m_ShadowAtlasResolution: 256 - m_VolumeFrameworkUpdateMode: 0 - m_Textures: - blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3} - bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3} - m_PrefilteringModeMainLightShadows: 1 - m_PrefilteringModeAdditionalLight: 4 - m_PrefilteringModeAdditionalLightShadows: 1 - m_PrefilterXRKeywords: 0 - m_PrefilteringModeForwardPlus: 1 - m_PrefilteringModeDeferredRendering: 1 - m_PrefilteringModeScreenSpaceOcclusion: 1 - m_PrefilterDebugKeywords: 0 - m_PrefilterWriteRenderingLayers: 0 - m_PrefilterHDROutput: 0 - m_PrefilterSSAODepthNormals: 0 - m_PrefilterSSAOSourceDepthLow: 0 - m_PrefilterSSAOSourceDepthMedium: 0 - m_PrefilterSSAOSourceDepthHigh: 0 - m_PrefilterSSAOInterleaved: 0 - m_PrefilterSSAOBlueNoise: 0 - m_PrefilterSSAOSampleCountLow: 0 - m_PrefilterSSAOSampleCountMedium: 0 - m_PrefilterSSAOSampleCountHigh: 0 - m_PrefilterDBufferMRT1: 0 - m_PrefilterDBufferMRT2: 0 - m_PrefilterDBufferMRT3: 0 - m_PrefilterSoftShadowsQualityLow: 0 - m_PrefilterSoftShadowsQualityMedium: 0 - m_PrefilterSoftShadowsQualityHigh: 0 - m_PrefilterSoftShadows: 0 - m_PrefilterScreenCoord: 0 - m_PrefilterNativeRenderPass: 0 - m_ShaderVariantLogLevel: 0 - m_ShadowCascades: 1 diff --git a/Assets/Settings/URP-HighFidelity.asset.meta b/Assets/Settings/URP-HighFidelity.asset.meta deleted file mode 100644 index 7416e17..0000000 --- a/Assets/Settings/URP-HighFidelity.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7b7fd9122c28c4d15b667c7040e3b3fd -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Settings/URP-Performant-Renderer.asset b/Assets/Settings/URP-Performant-Renderer.asset deleted file mode 100644 index 56c53f0..0000000 --- a/Assets/Settings/URP-Performant-Renderer.asset +++ /dev/null @@ -1,52 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3} - m_Name: URP-Performant-Renderer - m_EditorClassIdentifier: - debugShaders: - debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7, - type: 3} - m_RendererFeatures: [] - m_RendererFeatureMap: - m_UseNativeRenderPass: 0 - postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2} - shaders: - blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3} - copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3} - screenSpaceShadowPS: {fileID: 0} - samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3} - stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3} - fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3} - materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3} - coreBlitPS: {fileID: 0} - coreBlitColorAndDepthPS: {fileID: 0} - cameraMotionVector: {fileID: 0} - objectMotionVector: {fileID: 0} - m_OpaqueLayerMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_TransparentLayerMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_DefaultStencilState: - overrideStencilState: 0 - stencilReference: 0 - stencilCompareFunction: 8 - passOperation: 2 - failOperation: 0 - zFailOperation: 0 - m_ShadowTransparentReceive: 1 - m_RenderingMode: 0 - m_DepthPrimingMode: 0 - m_AccurateGbufferNormals: 0 - m_ClusteredRendering: 0 - m_TileSize: 32 diff --git a/Assets/Settings/URP-Performant-Renderer.asset.meta b/Assets/Settings/URP-Performant-Renderer.asset.meta deleted file mode 100644 index 912ff60..0000000 --- a/Assets/Settings/URP-Performant-Renderer.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 707360a9c581a4bd7aa53bfeb1429f71 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Settings/URP-Performant.asset b/Assets/Settings/URP-Performant.asset deleted file mode 100644 index 8650b69..0000000 --- a/Assets/Settings/URP-Performant.asset +++ /dev/null @@ -1,114 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3} - m_Name: URP-Performant - m_EditorClassIdentifier: - k_AssetVersion: 11 - k_AssetPreviousVersion: 11 - m_RendererType: 1 - m_RendererData: {fileID: 0} - m_RendererDataList: - - {fileID: 11400000, guid: 707360a9c581a4bd7aa53bfeb1429f71, type: 2} - m_DefaultRendererIndex: 0 - m_RequireDepthTexture: 0 - m_RequireOpaqueTexture: 0 - m_OpaqueDownsampling: 1 - m_SupportsTerrainHoles: 1 - m_SupportsHDR: 0 - m_HDRColorBufferPrecision: 0 - m_MSAA: 1 - m_RenderScale: 1 - m_UpscalingFilter: 0 - m_FsrOverrideSharpness: 0 - m_FsrSharpness: 0.92 - m_EnableLODCrossFade: 1 - m_LODCrossFadeDitheringType: 1 - m_ShEvalMode: 0 - m_MainLightRenderingMode: 1 - m_MainLightShadowsSupported: 0 - m_MainLightShadowmapResolution: 1024 - m_AdditionalLightsRenderingMode: 0 - m_AdditionalLightsPerObjectLimit: 4 - m_AdditionalLightShadowsSupported: 0 - m_AdditionalLightsShadowmapResolution: 512 - m_AdditionalLightsShadowResolutionTierLow: 128 - m_AdditionalLightsShadowResolutionTierMedium: 256 - m_AdditionalLightsShadowResolutionTierHigh: 512 - m_ReflectionProbeBlending: 0 - m_ReflectionProbeBoxProjection: 0 - m_ShadowDistance: 50 - m_ShadowCascadeCount: 1 - m_Cascade2Split: 0.25 - m_Cascade3Split: {x: 0.1, y: 0.3} - m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467} - m_CascadeBorder: 0.1 - m_ShadowDepthBias: 1 - m_ShadowNormalBias: 1 - m_AnyShadowsSupported: 1 - m_SoftShadowsSupported: 0 - m_ConservativeEnclosingSphere: 0 - m_NumIterationsEnclosingSphere: 64 - m_SoftShadowQuality: 2 - m_AdditionalLightsCookieResolution: 2048 - m_AdditionalLightsCookieFormat: 3 - m_UseSRPBatcher: 1 - m_SupportsDynamicBatching: 0 - m_MixedLightingSupported: 1 - m_SupportsLightCookies: 1 - m_SupportsLightLayers: 0 - m_DebugLevel: 0 - m_StoreActionsOptimization: 0 - m_EnableRenderGraph: 0 - m_UseAdaptivePerformance: 1 - m_ColorGradingMode: 0 - m_ColorGradingLutSize: 16 - m_UseFastSRGBLinearConversion: 0 - m_SupportDataDrivenLensFlare: 1 - m_ShadowType: 1 - m_LocalShadowsSupported: 0 - m_LocalShadowsAtlasResolution: 256 - m_MaxPixelLights: 0 - m_ShadowAtlasResolution: 256 - m_VolumeFrameworkUpdateMode: 0 - m_Textures: - blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3} - bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3} - m_PrefilteringModeMainLightShadows: 1 - m_PrefilteringModeAdditionalLight: 4 - m_PrefilteringModeAdditionalLightShadows: 1 - m_PrefilterXRKeywords: 0 - m_PrefilteringModeForwardPlus: 1 - m_PrefilteringModeDeferredRendering: 1 - m_PrefilteringModeScreenSpaceOcclusion: 1 - m_PrefilterDebugKeywords: 0 - m_PrefilterWriteRenderingLayers: 0 - m_PrefilterHDROutput: 0 - m_PrefilterSSAODepthNormals: 0 - m_PrefilterSSAOSourceDepthLow: 0 - m_PrefilterSSAOSourceDepthMedium: 0 - m_PrefilterSSAOSourceDepthHigh: 0 - m_PrefilterSSAOInterleaved: 0 - m_PrefilterSSAOBlueNoise: 0 - m_PrefilterSSAOSampleCountLow: 0 - m_PrefilterSSAOSampleCountMedium: 0 - m_PrefilterSSAOSampleCountHigh: 0 - m_PrefilterDBufferMRT1: 0 - m_PrefilterDBufferMRT2: 0 - m_PrefilterDBufferMRT3: 0 - m_PrefilterSoftShadowsQualityLow: 0 - m_PrefilterSoftShadowsQualityMedium: 0 - m_PrefilterSoftShadowsQualityHigh: 0 - m_PrefilterSoftShadows: 0 - m_PrefilterScreenCoord: 0 - m_PrefilterNativeRenderPass: 0 - m_ShaderVariantLogLevel: 0 - m_ShadowCascades: 0 diff --git a/Assets/Settings/URP-Performant.asset.meta b/Assets/Settings/URP-Performant.asset.meta deleted file mode 100644 index 264c9c5..0000000 --- a/Assets/Settings/URP-Performant.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d0e2fc18fe036412f8223b3b3d9ad574 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/ProjectSettings/BurstAotSettings_StandaloneWindows.json b/ProjectSettings/BurstAotSettings_StandaloneWindows.json index 2144f6d..34712b4 100644 --- a/ProjectSettings/BurstAotSettings_StandaloneWindows.json +++ b/ProjectSettings/BurstAotSettings_StandaloneWindows.json @@ -1,16 +1,18 @@ { "MonoBehaviour": { - "Version": 3, + "Version": 5, "EnableBurstCompilation": true, "EnableOptimisations": true, "EnableSafetyChecks": false, "EnableDebugInAllBuilds": false, - "UsePlatformSDKLinker": false, + "DebugDataKind": 0, + "EnableArmv9SecurityFeatures": false, "CpuMinTargetX32": 0, "CpuMaxTargetX32": 0, "CpuMinTargetX64": 0, "CpuMaxTargetX64": 0, "CpuTargetsX32": 6, - "CpuTargetsX64": 72 + "CpuTargetsX64": 72, + "OptimizeFor": 0 } } diff --git a/ProjectSettings/CommonBurstAotSettings.json b/ProjectSettings/CommonBurstAotSettings.json index 3dffdba..a6a6297 100644 --- a/ProjectSettings/CommonBurstAotSettings.json +++ b/ProjectSettings/CommonBurstAotSettings.json @@ -1,6 +1,6 @@ { "MonoBehaviour": { - "Version": 3, + "Version": 5, "DisabledWarnings": "" } } diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index 594ebe3..c9e6d78 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -11,4 +11,7 @@ EditorBuildSettings: - enabled: 1 path: Assets/GameMain/Scenes/GameplayA.unity guid: 639c98846a76d624cbac99ade4a1e1a3 + - enabled: 1 + path: Assets/GameMain/Scenes/Menu.unity + guid: 5ae1171af6ab9b646b7a915598c657f1 m_configObjects: {} diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 403c004..191853f 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -12,8 +12,8 @@ PlayerSettings: targetDevice: 2 useOnDemandResources: 0 accelerometerFrequency: 60 - companyName: DefaultCompany - productName: StarForce1 + companyName: Comet + productName: Biography of Li Jian defaultCursor: {fileID: 0} cursorHotspot: {x: 0, y: 0} m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} @@ -104,7 +104,7 @@ PlayerSettings: xboxEnableKinectAutoTracking: 0 xboxEnableFitness: 0 visibleInBackground: 1 - allowFullscreenSwitch: 1 + allowFullscreenSwitch: 0 fullscreenMode: 1 xboxSpeechDB: 0 xboxEnableHeadOrientation: 0 diff --git a/ProjectSettings/QualitySettings.asset b/ProjectSettings/QualitySettings.asset index af75b7f..e61f588 100644 --- a/ProjectSettings/QualitySettings.asset +++ b/ProjectSettings/QualitySettings.asset @@ -4,110 +4,10 @@ QualitySettings: m_ObjectHideFlags: 0 serializedVersion: 5 - m_CurrentQuality: 2 + m_CurrentQuality: 1 m_QualitySettings: - serializedVersion: 3 - name: Performant - pixelLightCount: 0 - shadows: 0 - shadowResolution: 0 - shadowProjection: 1 - shadowCascades: 1 - shadowDistance: 20 - shadowNearPlaneOffset: 3 - shadowCascade2Split: 0.33333334 - shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} - shadowmaskMode: 0 - skinWeights: 2 - globalTextureMipmapLimit: 0 - textureMipmapLimitSettings: [] - anisotropicTextures: 0 - antiAliasing: 0 - softParticles: 0 - softVegetation: 0 - realtimeReflectionProbes: 0 - billboardsFaceCameraPosition: 0 - useLegacyDetailDistribution: 1 - vSyncCount: 0 - realtimeGICPUUsage: 25 - lodBias: 0.4 - maximumLODLevel: 0 - enableLODCrossFade: 1 - streamingMipmapsActive: 0 - streamingMipmapsAddAllCameras: 1 - streamingMipmapsMemoryBudget: 512 - streamingMipmapsRenderersPerFrame: 512 - streamingMipmapsMaxLevelReduction: 2 - streamingMipmapsMaxFileIORequests: 1024 - particleRaycastBudget: 4 - asyncUploadTimeSlice: 2 - asyncUploadBufferSize: 16 - asyncUploadPersistentBuffer: 1 - resolutionScalingFixedDPIFactor: 1 - customRenderPipeline: {fileID: 11400000, guid: d0e2fc18fe036412f8223b3b3d9ad574, - type: 2} - terrainQualityOverrides: 0 - terrainPixelError: 1 - terrainDetailDensityScale: 1 - terrainBasemapDistance: 1000 - terrainDetailDistance: 80 - terrainTreeDistance: 5000 - terrainBillboardStart: 50 - terrainFadeLength: 5 - terrainMaxTrees: 50 - excludedTargetPlatforms: [] - - serializedVersion: 3 - name: Balanced - pixelLightCount: 1 - shadows: 1 - shadowResolution: 0 - shadowProjection: 1 - shadowCascades: 1 - shadowDistance: 20 - shadowNearPlaneOffset: 3 - shadowCascade2Split: 0.33333334 - shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} - shadowmaskMode: 0 - skinWeights: 4 - globalTextureMipmapLimit: 0 - textureMipmapLimitSettings: [] - anisotropicTextures: 1 - antiAliasing: 0 - softParticles: 0 - softVegetation: 0 - realtimeReflectionProbes: 0 - billboardsFaceCameraPosition: 0 - useLegacyDetailDistribution: 1 - vSyncCount: 1 - realtimeGICPUUsage: 25 - lodBias: 1 - maximumLODLevel: 0 - enableLODCrossFade: 1 - streamingMipmapsActive: 0 - streamingMipmapsAddAllCameras: 1 - streamingMipmapsMemoryBudget: 512 - streamingMipmapsRenderersPerFrame: 512 - streamingMipmapsMaxLevelReduction: 2 - streamingMipmapsMaxFileIORequests: 1024 - particleRaycastBudget: 64 - asyncUploadTimeSlice: 2 - asyncUploadBufferSize: 16 - asyncUploadPersistentBuffer: 1 - resolutionScalingFixedDPIFactor: 1 - customRenderPipeline: {fileID: 11400000, guid: e1260c1148f6143b28bae5ace5e9c5d1, - type: 2} - terrainQualityOverrides: 0 - terrainPixelError: 1 - terrainDetailDensityScale: 1 - terrainBasemapDistance: 1000 - terrainDetailDistance: 80 - terrainTreeDistance: 5000 - terrainBillboardStart: 50 - terrainFadeLength: 5 - terrainMaxTrees: 50 - excludedTargetPlatforms: [] - - serializedVersion: 3 - name: High Fidelity + name: AntiAliasing pixelLightCount: 2 shadows: 2 shadowResolution: 1 @@ -156,21 +56,71 @@ QualitySettings: terrainFadeLength: 5 terrainMaxTrees: 50 excludedTargetPlatforms: [] + - serializedVersion: 3 + name: Normal + pixelLightCount: 1 + shadows: 1 + shadowResolution: 0 + shadowProjection: 1 + shadowCascades: 1 + shadowDistance: 20 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 1 + skinWeights: 255 + globalTextureMipmapLimit: 0 + textureMipmapLimitSettings: [] + anisotropicTextures: 2 + antiAliasing: 0 + softParticles: 0 + softVegetation: 0 + realtimeReflectionProbes: 1 + billboardsFaceCameraPosition: 1 + useLegacyDetailDistribution: 1 + vSyncCount: 1 + realtimeGICPUUsage: 25 + lodBias: 2 + maximumLODLevel: 0 + enableLODCrossFade: 1 + streamingMipmapsActive: 0 + streamingMipmapsAddAllCameras: 1 + streamingMipmapsMemoryBudget: 512 + streamingMipmapsRenderersPerFrame: 512 + streamingMipmapsMaxLevelReduction: 2 + streamingMipmapsMaxFileIORequests: 1024 + particleRaycastBudget: 2048 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 16 + asyncUploadPersistentBuffer: 1 + resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 11400000, guid: e1260c1148f6143b28bae5ace5e9c5d1, + type: 2} + terrainQualityOverrides: 0 + terrainPixelError: 1 + terrainDetailDensityScale: 1 + terrainBasemapDistance: 1000 + terrainDetailDistance: 80 + terrainTreeDistance: 5000 + terrainBillboardStart: 50 + terrainFadeLength: 5 + terrainMaxTrees: 50 + excludedTargetPlatforms: [] m_TextureMipmapLimitGroupNames: [] m_PerPlatformDefaultQuality: - Android: 1 - CloudRendering: 2 - GameCoreScarlett: 2 - GameCoreXboxOne: 2 - Lumin: 2 - Nintendo Switch: 2 - PS4: 2 - PS5: 2 + Android: 0 + CloudRendering: 1 + GameCoreScarlett: 1 + GameCoreXboxOne: 1 + Lumin: 1 + Nintendo Switch: 1 + PS4: 1 + PS5: 1 Server: 0 - Stadia: 2 - Standalone: 2 - WebGL: 1 - Windows Store Apps: 2 - XboxOne: 2 - iPhone: 1 - tvOS: 1 + Stadia: 1 + Standalone: 1 + WebGL: 0 + Windows Store Apps: 1 + XboxOne: 1 + iPhone: 0 + tvOS: 0 diff --git a/数据表/Music.txt b/数据表/Music.txt deleted file mode 100644 index c94009f..0000000 --- a/数据表/Music.txt +++ /dev/null @@ -1,7 +0,0 @@ -# 音乐配置表 -# Id AssetName -# int string -# 音乐编号 策划备注 资源名称 - 1 菜单音乐 music_menu - 2 战斗音乐 music_background - 3 关于音乐 music_about diff --git a/数据表/Music.xlsx b/数据表/Music.xlsx deleted file mode 100644 index c10de82..0000000 Binary files a/数据表/Music.xlsx and /dev/null differ diff --git a/数据表/Scene.xlsx b/数据表/Scene.xlsx index 211b798..428b1de 100644 Binary files a/数据表/Scene.xlsx and b/数据表/Scene.xlsx differ diff --git a/数据表/Sound.xlsx b/数据表/Sound.xlsx deleted file mode 100644 index f5bf6e4..0000000 Binary files a/数据表/Sound.xlsx and /dev/null differ diff --git a/数据表/UIForm.txt b/数据表/UIForm.txt index eccc80b..c97b02d 100644 --- a/数据表/UIForm.txt +++ b/数据表/UIForm.txt @@ -2,7 +2,7 @@ # Id AssetName UIGroupName AllowMultiInstance PauseCoveredUIForm # int string string bool bool # 界面编号 策划备注 资源名称 界面组名称 是否允许多个界面实例 是否暂停被其覆盖的界面 - 1 弹出框 DialogForm Default True True + 1 弹出框 DialogForm Dialog True True 100 主菜单 MenuForm Default False True 101 设置 SettingForm Default False True 102 关于 AboutForm Default False True diff --git a/数据表/UIForm.xlsx b/数据表/UIForm.xlsx index ba5c519..1d559d7 100644 Binary files a/数据表/UIForm.xlsx and b/数据表/UIForm.xlsx differ diff --git a/数据表/UISound.txt b/数据表/UISound.txt deleted file mode 100644 index 87e1cd2..0000000 --- a/数据表/UISound.txt +++ /dev/null @@ -1,6 +0,0 @@ -# 声音配置表 -# Id AssetName Priority Volume -# int string int float -# 声音编号 策划备注 资源名称 优先级(默认0,128最高,-128最低) 音量(0~1) - 10000 选择音效 select 0 1 - 10001 点击音效 click 0 1 diff --git a/数据表/UISound.xlsx b/数据表/UISound.xlsx deleted file mode 100644 index e27c9d2..0000000 Binary files a/数据表/UISound.xlsx and /dev/null differ diff --git a/数据表/convert.py b/数据表/convert.py index 5ca4b8a..560b3c1 100644 --- a/数据表/convert.py +++ b/数据表/convert.py @@ -5,10 +5,17 @@ import pandas as pd def convert_excel_to_txt(folder_path='.'): - # 计数器,用于最后统计 + # ✅ 关键修复:将 '.' 转换为脚本所在目录的绝对路径 + if folder_path == '.': + folder_path = os.path.dirname(os.path.abspath(__file__)) + + print(f"【调试】当前工作目录: {os.getcwd()}") + print(f"【调试】遍历起始目录: {folder_path}\n") + count = 0 - target_dir = os.path.join(os.path.dirname(__file__), '../Assets/GameMain/DataTables') + target_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '../Assets/GameMain/DataTables') target_dir = os.path.abspath(target_dir) + # ... 后续代码不变 # 确保目标目录存在 os.makedirs(target_dir, exist_ok=True)