【m】增加web第一版暂存
All checks were successful
Plugin Library CI / publish (00.BuildOriginality) (push) Successful in 4s
Plugin Library CI / publish (00.StaryEvo) (push) Successful in 4s
Plugin Library CI / publish (00.StaryEvoTools) (push) Successful in 10s
Plugin Library CI / publish (01.HybridCLR) (push) Successful in 5s
Plugin Library CI / publish (02.InformationSave) (push) Successful in 3s
Plugin Library CI / publish (03.YooAsset) (push) Successful in 32s
Plugin Library CI / publish (04.AudioCore) (push) Successful in 3s
Plugin Library CI / publish (05.TableTextConversion) (push) Successful in 4s
Plugin Library CI / publish (06.UIFarme) (push) Successful in 16s
Plugin Library CI / publish (07.RKTools) (push) Successful in 3s
Plugin Library CI / publish (08.UniTask) (push) Successful in 3s
Plugin Library CI / publish (09.CodeChecker) (push) Successful in 16s
Plugin Library CI / publish (10.StoryEditor) (push) Successful in 3s
Plugin Library CI / publish (10.XNode) (push) Successful in 3s
Plugin Library CI / publish (11.PointCloudTools) (push) Successful in 3s

This commit is contained in:
2026-04-18 01:00:51 +08:00
parent ef5113afc6
commit 60f1264d51
20 changed files with 227 additions and 200 deletions

View File

@@ -1,76 +0,0 @@
using System;
using System.Linq;
using UnityEditor;
using UnityEngine;
namespace Stary.Evo.Editor
{
public class ChangeHotUpdateSchema
{
public static HotUpdateMode HotUpdateMode
{
get => _hotUpdate;
set => SetHotUpdateMode(value);
}
private static HotUpdateMode _hotUpdate;
private const string EditorNotUpdateMode = "Evo/Schema/ChangeHotUpdate/NOTUPDARE(非热更模式)";
private const string EditorHotUpdateMode = "Evo/Schema/ChangeHotUpdate/HOTUPDATE(热更模式)";
[MenuItem(EditorNotUpdateMode)]
private static void SetNotUpdateMode() => SetHotUpdateMode(HotUpdateMode.NotUpdate);
[MenuItem(EditorHotUpdateMode)]
private static void SetHotUpdateMode() => SetHotUpdateMode(HotUpdateMode.HotUpdate);
// [MenuItem(WebPlayMode)]
// private static void SetWebMode() => SetPlayerMode(HotUpdateMode.WEB_PLAYMODE);
[MenuItem(EditorNotUpdateMode, true)]
private static bool ValidateModeMenu()
{
string platform = CustomEditorPrefs.GetString("ChangeHotUpdateSchema");
Menu.SetChecked(EditorNotUpdateMode, platform == HotUpdateMode.NotUpdate.ToString());
Menu.SetChecked(EditorHotUpdateMode, platform == HotUpdateMode.HotUpdate.ToString());
//Menu.SetChecked(WebPlayMode, platform == HotUpdateMode.WEB_PLAYMODE.ToString());
Debug.Log("ChangeHotUpdateSchema:"+platform);
return true;
}
public static void SetHotUpdateMode(HotUpdateMode mode)
{
// 清除所有旧模式定义
var currentTarget = EditorUserBuildSettings.selectedBuildTargetGroup;
if (currentTarget == BuildTargetGroup.Unknown) return;
var defines = PlayerSettings.GetScriptingDefineSymbolsForGroup(currentTarget)
.Split(';')
.Where(d => !Enum.GetNames(typeof(HotUpdateMode)).Contains(d))
.ToList();
// 添加新模式
defines.Add(mode.ToString());
PlayerSettings.SetScriptingDefineSymbolsForGroup(currentTarget, string.Join(";", defines));
_hotUpdate = mode;
CustomEditorPrefs.SetString("ChangeHotUpdateSchema", _hotUpdate.ToString());
ValidateModeMenu();
AssetDatabase.Refresh();
// 添加解决方案文件重新生成逻辑
EditorApplication.delayCall += () =>
{
UnityEditor.Compilation.CompilationPipeline.RequestScriptCompilation();
Debug.Log($"当前编译符号: {string.Join(";", defines)}"); // 添加调试日志
};
}
}
public enum HotUpdateMode
{
//非热更模式,
NotUpdate,
//热更模式
HotUpdate,
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 7d18419d2d9c488687f9aff50cbd8357
timeCreated: 1751423025

View File

@@ -26,8 +26,8 @@ namespace Stary.Evo.Editor
private static void SetHostMode() => SetPlayerMode(PLayerMode.HOST_PLAYMODE);
[MenuItem(LocalPlayMode, false,3)]
private static void SetLocalMode() => SetPlayerMode(PLayerMode.LOCAL_PLAYMODE);
// [MenuItem(WebPlayMode)]
// private static void SetWebMode() => SetPlayerMode(PLayerMode.WEB_PLAYMODE);
[MenuItem(WebPlayMode)]
private static void SetWebMode() => SetPlayerMode(PLayerMode.WEB_PLAYMODE);
[MenuItem(EditorSimulateMode, true,3)]
private static bool ValidateModeMenu()
@@ -36,7 +36,7 @@ namespace Stary.Evo.Editor
Menu.SetChecked(EditorSimulateMode, platform == PLayerMode.EDITOR_SIMULATEMODE.ToString());
Menu.SetChecked(HostPlayMode, platform == PLayerMode.HOST_PLAYMODE.ToString());
Menu.SetChecked(LocalPlayMode, platform == PLayerMode.LOCAL_PLAYMODE.ToString());
//Menu.SetChecked(WebPlayMode, platform == PLayerMode.WEB_PLAYMODE.ToString());
Menu.SetChecked(WebPlayMode, platform == PLayerMode.WEB_PLAYMODE.ToString());
Debug.Log($"ChangePlayerSchema:{platform}");
return true;
}
@@ -79,6 +79,6 @@ namespace Stary.Evo.Editor
//本地运行模式
LOCAL_PLAYMODE,
// //web运行模式
// WEB_PLAYMODE
WEB_PLAYMODE
}
}