更新sdk

This commit is contained in:
2026-03-18 15:52:02 +08:00
parent 52bd0d8e48
commit 5981631076
115 changed files with 532 additions and 314 deletions

View File

@@ -231,8 +231,8 @@ namespace AnyThink.Scripts.Editor
{
Directory.CreateDirectory(resXmlPath);
}
// var fromScriptableObject = MonoScript.FromScriptableObject(this);
var xmlPath = GetScriptsPath("ATPostProcessBuildAndroid");
var xmlPath = GetScriptsPath("ATPostProcessBuildAndroid");
saveFile($"{xmlPath}/anythink_network_security_config.xml", resXmlPath);
}
@@ -243,17 +243,15 @@ namespace AnyThink.Scripts.Editor
file.CopyTo(toFilesPath + "/" + newFileName, true);
}
public static string GetScriptsPath (string scriptName)
public static string GetScriptsPath(string scriptName)
{
string[] path = UnityEditor.AssetDatabase.FindAssets(scriptName);
if(path.Length>1)
var guids = AssetDatabase.FindAssets($"{scriptName} t:Script");
if (guids.Length != 1)
{
// Debug.LogError("有同名文件"+_scriptName+"获取路径失败");
return null;
}
//将字符串中得脚本名字和后缀统统去除掉
string _path = AssetDatabase.GUIDToAssetPath(path[0]).Replace((@"/" +scriptName +".cs"),"");
return _path;
return AssetDatabase.GUIDToAssetPath(guids[0]).Replace("/" + scriptName + ".cs", "");
}
private static void addNetworkSecurityConfigInApplication(string path, bool isChina)
@@ -341,4 +339,4 @@ namespace AnyThink.Scripts.Editor
}
#endif
#endif