void LoadSDKConfig() { sdkConfigs.Clear(); sdkConfigNames.Clear(); string root = Application.dataPath + "/Res/Template/SDKConfig/"; string[] files = Directory.GetFiles(root, "*.json", SearchOption.TopDirectoryOnly); for (int i = 0; i < files.Length; ++i) { var config = SDKConfig.LoadSDKConfig(File.ReadAllText(files[i])); sdkConfigs.Add(config); sdkConfigNames.Add(config.show_name); } }
/// <summary> /// 加载SDK配置 /// </summary> private void loadSDKConfig() { sdkConfigs.Clear(); string root = BuilderPreference.SDK_CONFIG_PATH; string[] files = Directory.GetFiles(root, "*.json", SearchOption.TopDirectoryOnly); NameSDKs = new string[files.Length]; for (int i = 0; i < files.Length; ++i) { var config = SDKConfig.LoadSDKConfig(File.ReadAllText(files[i])); sdkConfigs.Add(config); NameSDKs[i] = config.show_name; } }