【m】增加打包前设置
This commit is contained in:
@@ -3,6 +3,7 @@ using Stary.Evo.Editor;
|
||||
using UnityEditor;
|
||||
using UnityEditor.Build;
|
||||
using UnityEditor.Callbacks;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Stary.Evo
|
||||
{
|
||||
@@ -14,7 +15,27 @@ namespace Stary.Evo
|
||||
public void OnPreprocessBuild(UnityEditor.Build.Reporting.BuildReport report)
|
||||
{
|
||||
// build前
|
||||
if (ChangePlayerSchema.PLayerMode == PLayerMode.EDITOR_SIMULATEMODE)
|
||||
{
|
||||
int id = EditorUtility.DisplayDialogComplex("提示",
|
||||
$"当前为[{PLayerMode.EDITOR_SIMULATEMODE}]模式,请选择切换得热更模式!",
|
||||
$"{PLayerMode.HOST_PLAYMODE}", $"{PLayerMode.OFFLINE_PLAYMODE}", "取消");
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case 0:
|
||||
ChangePlayerSchema.SetPlayerMode(PLayerMode.HOST_PLAYMODE);
|
||||
Debug.Log("切换为[HOST_PLAYMODE]模式");
|
||||
break;
|
||||
case 1:
|
||||
ChangePlayerSchema.SetPlayerMode(PLayerMode.OFFLINE_PLAYMODE);
|
||||
Debug.Log("切换为[OFFLINE_PLAYMODE]模式");
|
||||
break;
|
||||
case 2:
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void OnPostprocessBuild(UnityEditor.Build.Reporting.BuildReport report)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "com.staryevo.main",
|
||||
"version": "1.3.15",
|
||||
"version": "1.3.16",
|
||||
"displayName": "00.StaryEvo",
|
||||
"description": "This is an Framework package(后台服务器版本,端口9527)",
|
||||
"unity": "2021.3",
|
||||
|
||||
Reference in New Issue
Block a user