You've already forked Commercialization.topon
1.0.9
This commit is contained in:
@@ -230,8 +230,9 @@ namespace AnyThink.Scripts.Editor
|
||||
{
|
||||
Directory.CreateDirectory(resXmlPath);
|
||||
}
|
||||
|
||||
saveFile("Assets/AnyThinkPlugin/Script/Editor/anythink_network_security_config.xml", resXmlPath);
|
||||
// var fromScriptableObject = MonoScript.FromScriptableObject(this);
|
||||
var xmlPath = GetScriptsPath("ATPostProcessBuildAndroid");
|
||||
saveFile($"{xmlPath}/anythink_network_security_config.xml", resXmlPath);
|
||||
}
|
||||
|
||||
public static void saveFile(string filePathName , string toFilesPath)
|
||||
@@ -241,6 +242,19 @@ namespace AnyThink.Scripts.Editor
|
||||
file.CopyTo(toFilesPath + "/" + newFileName, true);
|
||||
}
|
||||
|
||||
public static string GetScriptsPath (string scriptName)
|
||||
{
|
||||
string[] path = UnityEditor.AssetDatabase.FindAssets(scriptName);
|
||||
if(path.Length>1)
|
||||
{
|
||||
// Debug.LogError("有同名文件"+_scriptName+"获取路径失败");
|
||||
return null;
|
||||
}
|
||||
//将字符串中得脚本名字和后缀统统去除掉
|
||||
string _path = AssetDatabase.GUIDToAssetPath(path[0]).Replace((@"/" +scriptName +".cs"),"");
|
||||
return _path;
|
||||
}
|
||||
|
||||
private static void addNetworkSecurityConfigInApplication(string path, bool isChina)
|
||||
{
|
||||
#if UNITY_2019_3_OR_NEWER
|
||||
|
||||
Reference in New Issue
Block a user