com.typhoon.unitysdk 1.0.40 → 1.0.42

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.
@@ -141,7 +141,6 @@ namespace TyphoonUnitySDK
141
141
  PlayerSettings.Android.minSdkVersion = setting.MinApiVersion;
142
142
  PlayerSettings.Android.targetSdkVersion = setting.TargetApiVersion;
143
143
 
144
-
145
144
 
146
145
  //覆写GraphicsAPI
147
146
  if (setting.GraphicsAPIs.Length > 0)
@@ -206,7 +205,7 @@ namespace TyphoonUnitySDK
206
205
 
207
206
  PlayerSettings.WebGL.exceptionSupport = setting.ExceptionSupport;
208
207
  PlayerSettings.WebGL.debugSymbols = setting.WebglDebugSymbols;
209
-
208
+
210
209
  //覆写AA参数
211
210
  AddressableSupport.ModifyAAProfileAndVariables(setting);
212
211
  //写入App config
@@ -423,6 +422,25 @@ namespace TyphoonUnitySDK
423
422
  };
424
423
 
425
424
 
425
+ //重新注入脚本
426
+ public static void ReimportScript(HashSet<string> files)
427
+ {
428
+ var match = new HashSet<string>();
429
+ foreach (var file in files)
430
+ {
431
+ if (file.EndsWith(".cs"))
432
+ {
433
+ match.Add(file);
434
+ }
435
+ }
436
+
437
+ foreach (var path in match)
438
+ {
439
+ AssetDatabase.ImportAsset(path, ImportAssetOptions.Default);
440
+ }
441
+ }
442
+
443
+
426
444
  /*应用ChinaAndroid*/
427
445
  public class ApplyChinaAndroid : IApply
428
446
  {
@@ -439,8 +457,7 @@ namespace TyphoonUnitySDK
439
457
  ClearFilesInDirectory(folder, manifest);
440
458
  }
441
459
 
442
- AssetDatabase.ImportAsset($"Assets/Typhoon_Gen/TyphoonSDK/Runtime/ChinaAndroid",
443
- ImportAssetOptions.ImportRecursive);
460
+ ReimportScript(manifest);
444
461
  AssetDatabase.Refresh();
445
462
  }
446
463
  }
@@ -478,8 +495,7 @@ namespace TyphoonUnitySDK
478
495
  ClearFilesInDirectory(folder, manifest);
479
496
  }
480
497
 
481
- AssetDatabase.ImportAsset($"Assets/Typhoon_Gen/TyphoonSDK/Runtime/WxMini",
482
- ImportAssetOptions.ImportRecursive);
498
+ ReimportScript(manifest);
483
499
  AssetDatabase.Refresh();
484
500
  }
485
501
  }
@@ -500,8 +516,7 @@ namespace TyphoonUnitySDK
500
516
  ClearFilesInDirectory(folder, manifest);
501
517
  }
502
518
 
503
- AssetDatabase.ImportAsset($"Assets/Typhoon_Gen/TyphoonSDK/Runtime/Douyin",
504
- ImportAssetOptions.ImportRecursive);
519
+ ReimportScript(manifest);
505
520
  AssetDatabase.Refresh();
506
521
  }
507
522
  }
@@ -522,8 +537,7 @@ namespace TyphoonUnitySDK
522
537
  ClearFilesInDirectory(folder, manifest);
523
538
  }
524
539
 
525
- AssetDatabase.ImportAsset($"Assets/Typhoon_Gen/TyphoonSDK/Runtime/GooglePlay",
526
- ImportAssetOptions.ImportRecursive);
540
+ ReimportScript(manifest);
527
541
  AssetDatabase.Refresh();
528
542
  }
529
543
  }
@@ -546,8 +560,7 @@ namespace TyphoonUnitySDK
546
560
  ClearFilesInDirectory(folder, manifest);
547
561
  }
548
562
 
549
- AssetDatabase.ImportAsset($"Assets/Typhoon_Gen/TyphoonSDK/Runtime/VivoMini",
550
- ImportAssetOptions.ImportRecursive);
563
+ ReimportScript(manifest);
551
564
  AssetDatabase.Refresh();
552
565
  }
553
566
  }
@@ -6,9 +6,9 @@ using UnityEngine;
6
6
  namespace TyphoonUnitySDK
7
7
  {
8
8
  /// <summary>
9
- /// Typhoon SDK
9
+ /// Typhoon SDK 实例
10
10
  /// </summary>
11
- public partial class TyphoonSdk : MonoSingleton<TyphoonSdk>
11
+ public partial class SdkLite : MonoSingleton<SdkLite>
12
12
  {
13
13
  /*绑定SDK实例*/
14
14
  public static Dictionary<AppChannel, string> SDKBindings = new Dictionary<AppChannel, string>
@@ -41,9 +41,9 @@ namespace TyphoonUnitySDK
41
41
  case AppChannel.ChinaAndroid:
42
42
  if (Input.GetKeyDown(KeyCode.Escape))
43
43
  {
44
- if (TyphoonSdk.Instance.IsSupportExitGame())
44
+ if (SdkLite.Instance.IsSupportExitGame())
45
45
  {
46
- TyphoonSdk.Instance.ExitGame();
46
+ SdkLite.Instance.ExitGame();
47
47
  }
48
48
  }
49
49
 
@@ -22,8 +22,11 @@ namespace TyphoonUnitySDK
22
22
  if (type.Name.Contains("WXTouchInputOverride"))
23
23
  {
24
24
  Debug.Log("补充WXTouchInputOverride组件");
25
+ #if !UNITY_EDITOR
25
26
  //补充WXTouchInputOverride组件
26
27
  gameObject.AddComponent(type);
28
+ #endif
29
+
27
30
  break;
28
31
  }
29
32
  }
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"com.typhoon.unitysdk","displayName":"typhoon unity sdk","version":"1.0.40","description":"","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.42","description":"","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"}}
File without changes