2025-02-07 16:04:12 +08:00
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Linq;
|
|
|
|
using Sirenix.OdinInspector;
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
namespace AlicizaX.Runtime
|
|
|
|
{
|
|
|
|
[Serializable]
|
|
|
|
public class FrameworkPublishSettings : ScriptableObject
|
|
|
|
{
|
|
|
|
[BoxGroup("版本配置", true)] [TableList(ShowIndexLabels = false, DrawScrollView = true, MaxScrollViewHeight = 200, AlwaysExpanded = true)]
|
2025-02-10 15:29:53 +08:00
|
|
|
public List<RemoteURLConfigSetting> Configs = new List<RemoteURLConfigSetting>
|
|
|
|
{
|
|
|
|
new RemoteURLConfigSetting() { Version_Type = "Release", CheckUrl = "http://127.0.0.1:8080/UpdateData.json" },
|
|
|
|
new RemoteURLConfigSetting() { Version_Type = "Dev", CheckUrl = "http://127.0.0.1:8080/UpdateData.json" },
|
|
|
|
new RemoteURLConfigSetting() { Version_Type = "Test", CheckUrl = "http://127.0.0.1:8080/UpdateData.json" },
|
|
|
|
};
|
2025-02-07 16:04:12 +08:00
|
|
|
|
|
|
|
[BoxGroup("版本配置", true)] [LabelText("当前版本")] [ValueDropdown("GetAllType", ExpandAllMenuItems = true)] [SerializeField]
|
2025-02-10 15:29:53 +08:00
|
|
|
public string AppStageType = "Dev";
|
2025-02-07 16:04:12 +08:00
|
|
|
|
|
|
|
public RemoteURLConfigSetting GetConfig()
|
|
|
|
{
|
2025-02-21 14:42:15 +08:00
|
|
|
return Configs.Find(s => s.Version_Type == AppStageType);
|
2025-02-07 16:04:12 +08:00
|
|
|
}
|
|
|
|
|
2025-02-21 14:42:15 +08:00
|
|
|
|
|
|
|
[ValueDropdown("GetResMode")] [BoxGroup("发布设置")] [LabelText("资源模式")]
|
|
|
|
public int ResMode;
|
|
|
|
|
|
|
|
[BoxGroup("发布设置")] [LabelText("默认语言")] public Language Language = Runtime.Language.ChineseSimplified;
|
|
|
|
|
|
|
|
private System.Collections.IEnumerable GetAllType
|
2025-02-07 16:04:12 +08:00
|
|
|
{
|
|
|
|
get { return Configs.Select(a => a.Version_Type).ToList(); }
|
|
|
|
}
|
2025-02-21 14:42:15 +08:00
|
|
|
|
|
|
|
|
|
|
|
private static System.Collections.IEnumerable GetResMode = new ValueDropdownList<int>()
|
|
|
|
{
|
|
|
|
{ "EditorSimulateMode", 0 },
|
|
|
|
{ "OfflinePlayMode", 1 },
|
|
|
|
{ "HostPlayMode", 2 },
|
|
|
|
{ "WebPlayMode", 3 },
|
|
|
|
};
|
2025-02-07 16:04:12 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Serializable]
|
|
|
|
public class RemoteURLConfigSetting
|
|
|
|
{
|
|
|
|
[TableColumnWidth(200, Resizable = false)]
|
|
|
|
public string Version_Type = "";
|
|
|
|
|
|
|
|
public string CheckUrl = "";
|
|
|
|
}
|
2025-02-10 15:29:53 +08:00
|
|
|
}
|