You've already forked Commercialization.topon
update 2.1.3
This commit is contained in:
@@ -16,9 +16,10 @@ namespace AnyThink.Scripts.IntegrationManager.Editor
|
||||
|
||||
public class ATConfig
|
||||
{
|
||||
public static string PLUGIN_VERSION = "2.1.1";
|
||||
public static string PLUGIN_VERSION = "2.1.3";
|
||||
public static bool isDebug = false;
|
||||
|
||||
public static int PLUGIN_TYPE = 1;
|
||||
public static int OS_ANDROID = 1;
|
||||
public static int OS_IOS = 2;
|
||||
public static int CHINA_COUNTRY = 1;
|
||||
@@ -328,48 +329,63 @@ public static bool isDebug = false;
|
||||
//获取admob app id
|
||||
public static string getAdmobAppIdByOs(int os) {
|
||||
var pluginSettingData = getPluginSettingData();
|
||||
if (pluginSettingData == null) {
|
||||
return "";
|
||||
}
|
||||
var settingData = pluginSettingData.getCountrySettingData();
|
||||
return settingData.getAdmobAppId(os);
|
||||
}
|
||||
|
||||
public static bool enableAndroidX() {
|
||||
var pluginSettingData = getPluginSettingData();
|
||||
if (pluginSettingData == null) {
|
||||
return false;
|
||||
}
|
||||
return pluginSettingData.getCountrySettingData().androidXSetting == 1;
|
||||
}
|
||||
|
||||
public static bool isDefaultAndroidX() {
|
||||
var pluginSettingData = getPluginSettingData();
|
||||
if (pluginSettingData == null) {
|
||||
return false;
|
||||
}
|
||||
return pluginSettingData.getCountrySettingData().androidXSetting == 0;
|
||||
}
|
||||
|
||||
//获取默认选中的地区
|
||||
public static int getDefCountry() {
|
||||
string version = PLUGIN_VERSION;
|
||||
int lastIndex = version.LastIndexOf('.');
|
||||
// string version = PLUGIN_VERSION;
|
||||
// int lastIndex = version.LastIndexOf('.');
|
||||
|
||||
if (lastIndex != -1)
|
||||
{
|
||||
//2.1.0:是区分国内海外的插件,2.1.01:后缀多了1,是只有海外的插件
|
||||
string lastPart = version.Substring(lastIndex + 1);
|
||||
if (lastPart.Length == 2) {
|
||||
return NONCHINA_COUNTRY;
|
||||
}
|
||||
// if (lastIndex != -1)
|
||||
// {
|
||||
// //2.1.0:是区分国内海外的插件,2.1.01:后缀多了1,是只有海外的插件
|
||||
// string lastPart = version.Substring(lastIndex + 1);
|
||||
// if (lastPart.Length == 2) {
|
||||
// return NONCHINA_COUNTRY;
|
||||
// }
|
||||
// }
|
||||
if(PLUGIN_TYPE == 2) {
|
||||
return NONCHINA_COUNTRY;
|
||||
}
|
||||
return CHINA_COUNTRY;
|
||||
}
|
||||
|
||||
public static string[] getCountryArray() {
|
||||
// new string[] { "ChinaMainland", "Overseas" }
|
||||
string version = PLUGIN_VERSION;
|
||||
int lastIndex = version.LastIndexOf('.');
|
||||
// string version = PLUGIN_VERSION;
|
||||
// int lastIndex = version.LastIndexOf('.');
|
||||
|
||||
if (lastIndex != -1)
|
||||
{
|
||||
//2.1.0:是区分国内海外的插件,2.1.01:后缀多了1,是只有海外的插件
|
||||
string lastPart = version.Substring(lastIndex + 1);
|
||||
if (lastPart.Length == 2) {
|
||||
return new string[] { "Overseas" };
|
||||
}
|
||||
// if (lastIndex != -1)
|
||||
// {
|
||||
// //2.1.0:是区分国内海外的插件,2.1.01:后缀多了1,是只有海外的插件
|
||||
// string lastPart = version.Substring(lastIndex + 1);
|
||||
// if (lastPart.Length == 2) {
|
||||
// return new string[] { "Overseas" };
|
||||
// }
|
||||
// }
|
||||
if(PLUGIN_TYPE == 2) {
|
||||
return new string[] { "Overseas" };
|
||||
}
|
||||
return new string[] { "ChinaMainland", "Overseas" };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user