com.typhoon.unitysdk 1.0.13 → 1.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,4 @@
1
+ using System.IO;
1
2
  using UnityEditor;
2
3
  using UnityEngine;
3
4
 
@@ -27,11 +28,10 @@ namespace TyphoonUnitySDK
27
28
  public string FloatIconID;
28
29
  public string NativeID;
29
30
  public string BannerID;
30
-
31
- [Header("友盟")]
32
- public string UMAppKey;
33
-
34
-
31
+
32
+ [Header("友盟")] public string UMAppKey;
33
+
34
+
35
35
  [Header("版本号")] public string Version = "1.0.0.0";
36
36
  public int VersionCode = 1000000;
37
37
  private static string PATH = "Assets/Editor/PublishVivoBatSetting.asset";
@@ -49,6 +49,7 @@ namespace TyphoonUnitySDK
49
49
 
50
50
  if (_default == null)
51
51
  {
52
+ UniEditor.CreateDirIfNotExist(Path.GetDirectoryName(PATH));
52
53
  _default = CreateInstance<PublishVivoBatSetting>();
53
54
  AssetDatabase.CreateAsset(_default, PATH);
54
55
  AssetDatabase.Refresh();
@@ -462,9 +462,29 @@ dependencies {{
462
462
  {
463
463
  throw new Exception($"找不到unity导出工程");
464
464
  }
465
- UniEditor.TryDeleteFolder(path);
466
- UniEditor.CopyFolder($@"{unityProj}\unityLibrary", path);
467
- Debug.Log($"写入:{path} ");
465
+
466
+ var from = $"{unityProj}/unityLibrary";
467
+ var to = $"{path}";
468
+ var map = new (string from, string to)[]
469
+ {
470
+ //{unityProj}\unityLibrary
471
+ ($"{from}/libs", $"{to}/libs"),
472
+ ($"{from}/src/main/assets", $"{to}/src/main/assets"),
473
+ ($"{from}/src/main/java", $"{to}/src/main/java"),
474
+ ($"{from}/src/main/jniLibs", $"{to}/src/main/jniLibs"),
475
+ };
476
+
477
+ var xmlPathForm = $"{from}/src/main/AndroidManifest.xml";
478
+ var xmlTo = $"{to}/src/main/AndroidManifest.xml";
479
+ foreach (var e in map)
480
+ {
481
+ UniEditor.TryDeleteFolder(e.from);
482
+ UniEditor.CopyFolder(e.from, e.to);
483
+ Debug.Log($"写入:{e.to} ");
484
+ }
485
+
486
+ File.Copy(xmlPathForm, xmlTo, true);
487
+ Debug.Log($"复制:{xmlTo} ");
468
488
 
469
489
  var xmlPath = GetUnityLibraryAndroidManifestXml();
470
490
  var xml = File.ReadAllText(xmlPath);
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"com.typhoon.unitysdk","displayName":"typhoon unity sdk","version":"1.0.13","description":"unity端个汇总渠道的sdk,统一接口,一键发布","unity":"2018.1","type":"tool","hideInEditor":false,"author":{"name":"Jan Zhang","email":"","url":""},"changelogUrl":"","documentationUrl":"","keywords":["typhoon"],"license":"","licensesUrl":"","customDependencies":[{"PackageName":"com.unity.nuget.newtonsoft-json","Value":"2.0.0"}],"dependencies":{"com.unity.nuget.newtonsoft-json":"2.0.0"}}
1
+ {"name":"com.typhoon.unitysdk","displayName":"typhoon unity sdk","version":"1.0.15","description":"unity端个汇总渠道的sdk,统一接口,一键发布","unity":"2018.1","type":"tool","hideInEditor":false,"author":{"name":"Jan Zhang","email":"","url":""},"changelogUrl":"","documentationUrl":"","keywords":["typhoon"],"license":"","licensesUrl":"","customDependencies":[{"PackageName":"com.unity.nuget.newtonsoft-json","Value":"2.0.0"}],"dependencies":{"com.unity.nuget.newtonsoft-json":"2.0.0"}}