com.alicizax.unity/Runtime/Constant/FrameworkPublishSettings.cs
陈思海 bf0d8340af init
2025-02-07 16:04:12 +08:00

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 = "";
}
}