- 完善设置面板的具体功能,全局性的设置项已经可以发挥作用了

- 调整部分项目结构和AB包设置,打包测试设置面板的功能
This commit is contained in:
SepComet
2026-02-11 14:58:05 +08:00
parent 13583354f9
commit deb2c01d01
64 changed files with 536 additions and 1536 deletions
@@ -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)
@@ -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<LocalizationHelperBase> m_LocalizationHelperInfo = new HelperInfo<LocalizationHelperBase>("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<LocalizationHelperBase> m_LocalizationHelperInfo = new HelperInfo<LocalizationHelperBase>("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();
// }
// }
// }