39 lines
1.2 KiB
C#
39 lines
1.2 KiB
C#
![]() |
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)]
|
||
|
public List<RemoteURLConfigSetting> Configs = new List<RemoteURLConfigSetting>();
|
||
|
|
||
|
[BoxGroup("版本配置", true)] [LabelText("当前版本")] [ValueDropdown("GetAllType", ExpandAllMenuItems = true)] [SerializeField]
|
||
|
public string AppStageType;
|
||
|
|
||
|
public RemoteURLConfigSetting GetConfig()
|
||
|
{
|
||
|
RemoteURLConfigSetting configSetting = Configs.Find(s => s.Version_Type == AppStageType);
|
||
|
return configSetting;
|
||
|
}
|
||
|
|
||
|
System.Collections.IEnumerable GetAllType
|
||
|
{
|
||
|
get { return Configs.Select(a => a.Version_Type).ToList(); }
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
[Serializable]
|
||
|
public class RemoteURLConfigSetting
|
||
|
{
|
||
|
[TableColumnWidth(200, Resizable = false)]
|
||
|
public string Version_Type = "";
|
||
|
|
||
|
public string CheckUrl = "";
|
||
|
}
|
||
|
}
|