using System.Collections; using System.Collections.Generic; using UnityEngine; public partial class ContactConfig { static List allConfigs = null; public static ContactConfig GetConfig(string appid, int branch) { if (allConfigs == null) { allConfigs = ContactConfig.GetValues(); } ContactConfig config = null; foreach (var item in allConfigs) { if (item.appid == appid) { if (config == null) { config = item; } else { if (item.branch == branch) { config = item; } } } } return config; } }