【m】优化加载架构

This commit is contained in:
zhangzheng
2026-01-05 17:58:53 +08:00
parent 033edf402f
commit af80facb43
28 changed files with 333 additions and 248 deletions

View File

@@ -16,31 +16,25 @@ namespace Stary.Evo.Editor
private static PLayerMode _pLayerMode;
private const string EditorSimulateMode = "Evo/Schema/ChangePlayer/EditorSimulateMode(编辑器调试模式)";
private const string OfflinePlayMode = "Evo/Schema/ChangePlayer/OfflinePlayMode(本地运行模式)";
private const string HostPlayMode = "Evo/Schema/ChangePlayer/HostPlayMode(服务器运行模式)";
private const string HostPlayMode = "Evo/Schema/ChangePlayer/HostPlayMode(联机运行模式)";
private const string WebPlayMode = "Evo/Schema/ChangePlayer/WebPlayMode(Web运行模式)";
[MenuItem(EditorSimulateMode)]
[MenuItem(EditorSimulateMode, false,3)]
private static void SetEditorMode() => SetPlayerMode(PLayerMode.EDITOR_SIMULATEMODE);
[MenuItem(OfflinePlayMode)]
private static void SetOfflineMode() => SetPlayerMode(PLayerMode.OFFLINE_PLAYMODE);
[MenuItem(HostPlayMode)]
[MenuItem(HostPlayMode, false,3)]
private static void SetHostMode() => SetPlayerMode(PLayerMode.HOST_PLAYMODE);
// [MenuItem(WebPlayMode)]
// private static void SetWebMode() => SetPlayerMode(PLayerMode.WEB_PLAYMODE);
[MenuItem(EditorSimulateMode, true)]
[MenuItem(EditorSimulateMode, true,3)]
private static bool ValidateModeMenu()
{
string platform = EditorPrefs.GetString("ChangePlayerSchema");
Menu.SetChecked(EditorSimulateMode, platform == PLayerMode.EDITOR_SIMULATEMODE.ToString());
Menu.SetChecked(OfflinePlayMode, platform == PLayerMode.OFFLINE_PLAYMODE.ToString());
Menu.SetChecked(HostPlayMode, platform == PLayerMode.HOST_PLAYMODE.ToString());
//Menu.SetChecked(WebPlayMode, platform == PLayerMode.WEB_PLAYMODE.ToString());
Debug.LogError("CheckPlatform");
Debug.LogError($"ChangePlayerSchema:{platform}");
return true;
}
@@ -77,10 +71,7 @@ namespace Stary.Evo.Editor
{
//编辑仿真模式,
EDITOR_SIMULATEMODE,
//单机运行模式
OFFLINE_PLAYMODE,
//联机运行模式
HOST_PLAYMODE,