This commit is contained in:
2023-09-14 14:20:26 +08:00
parent 97674a4b16
commit 39014e1de3
8 changed files with 45 additions and 7 deletions

View File

@@ -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

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 0ab81a6ad546c03418e309bb694407a8
guid: 7d3a96d567bfd7149b3d2882c2331f28
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 447f769e7e33b6b4b8c6bf167ff64d51
guid: dbbfc9e2efadb8c43b6c710eeff4abd9
DefaultImporter:
externalObjects: {}
userData:

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: f78a8058118e9824db89e5c1b18d3e47
guid: 47364f35dc20c164fab7f26e8a03dd67
DefaultImporter:
externalObjects: {}
userData:

16
Topon_Adapter.asmdef Normal file
View File

@@ -0,0 +1,16 @@
{
"name": "Topon_Adapter",
"rootNamespace": "",
"references": [
"GUID:3198a86b02613024e960e3d04a9638cd"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 8a3d1447e0a3bdf4fa07035516da8b62
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -29,7 +29,8 @@ public class AwardVideoPlayer : ADPlayer , ATRewardedVideoListener
this._onVideoComplete = onVideoComplete;
this.adListener.onClose = onClose;
this.adListener.onVideoComplete = this.OnVideoComplete;
this._atRewardedVideo.showAd(this.Key);
var json = new Dictionary<string, string> { { AnyThinkAds.Api.ATConst.SCENARIO, this.AdScene } };
this._atRewardedVideo.showAd(this.Key , json);
}
}

View File

@@ -2,7 +2,7 @@
"name": "com.commercialization.topon",
"displayName": "Commercialization.topon",
"description": "基于topon的广告sdk封装依赖基础商业化模块",
"version": "1.0.8",
"version": "1.0.9",
"unity": "2021.1",
"license": "MIT",
"repository": {