com.typhoon.unitysdk 1.1.15 → 1.1.17

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.
Files changed (87) hide show
  1. package/CHANGELOG.md +13 -1
  2. package/Editor/ExportModule.cs +20 -0
  3. package/Editor/Texture/dark/blue_active.png.meta +147 -144
  4. package/Editor/Texture/dark/blue_hover.png.meta +147 -144
  5. package/Editor/Texture/dark/blue_normal.png.meta +147 -144
  6. package/Editor/Texture/dark/green_active.png.meta +147 -144
  7. package/Editor/Texture/dark/green_hover.png.meta +147 -144
  8. package/Editor/Texture/dark/green_normal.png.meta +147 -144
  9. package/Editor/Texture/dark/help_box.png.meta +147 -144
  10. package/Editor/Texture/dark/menu_active.png.meta +147 -144
  11. package/Editor/Texture/dark/n_active.png.meta +147 -144
  12. package/Editor/Texture/dark/n_hover.png.meta +147 -144
  13. package/Editor/Texture/dark/n_normal.png.meta +147 -144
  14. package/Editor/Texture/dark/red_active.png.meta +147 -144
  15. package/Editor/Texture/dark/red_hover.png.meta +147 -144
  16. package/Editor/Texture/dark/red_normal.png.meta +147 -144
  17. package/Editor/Texture/dark/square_b_active.png.meta +147 -144
  18. package/Editor/Texture/dark/square_b_hover.png.meta +147 -144
  19. package/Editor/Texture/dark/square_b_normal.png.meta +147 -144
  20. package/Editor/Texture/dark/square_g_active.png.meta +147 -144
  21. package/Editor/Texture/dark/square_g_hover.png.meta +147 -144
  22. package/Editor/Texture/dark/square_g_normal.png.meta +147 -144
  23. package/Editor/Texture/dark/square_menu_active.png.meta +147 -144
  24. package/Editor/Texture/dark/square_n_active.png.meta +147 -144
  25. package/Editor/Texture/dark/square_n_hover.png.meta +147 -144
  26. package/Editor/Texture/dark/square_n_normal.png.meta +147 -144
  27. package/Editor/Texture/dark/square_r_active.png.meta +147 -144
  28. package/Editor/Texture/dark/square_r_hover.png.meta +147 -144
  29. package/Editor/Texture/dark/square_r_normal.png.meta +147 -144
  30. package/Editor/Texture/dark/square_y_active.png.meta +147 -144
  31. package/Editor/Texture/dark/square_y_hover.png.meta +147 -144
  32. package/Editor/Texture/dark/square_y_normal.png.meta +147 -144
  33. package/Editor/Texture/dark/title_bar.png.meta +147 -144
  34. package/Editor/Texture/dark/yellow_active.png.meta +147 -144
  35. package/Editor/Texture/dark/yellow_hover.png.meta +147 -144
  36. package/Editor/Texture/dark/yellow_normal.png.meta +147 -144
  37. package/Editor/Texture/icon/error.png.meta +147 -144
  38. package/Editor/Texture/icon/info.png.meta +147 -144
  39. package/Editor/Texture/icon/warning.png.meta +147 -144
  40. package/Editor/Texture/light/blue_active.png.meta +147 -144
  41. package/Editor/Texture/light/blue_hover.png.meta +147 -144
  42. package/Editor/Texture/light/blue_normal.png.meta +147 -144
  43. package/Editor/Texture/light/green_active.png.meta +147 -144
  44. package/Editor/Texture/light/green_hover.png.meta +147 -144
  45. package/Editor/Texture/light/green_normal.png.meta +147 -144
  46. package/Editor/Texture/light/help_box.png.meta +147 -144
  47. package/Editor/Texture/light/menu_active.png.meta +147 -144
  48. package/Editor/Texture/light/n_active.png.meta +147 -144
  49. package/Editor/Texture/light/n_hover.png.meta +147 -144
  50. package/Editor/Texture/light/n_normal.png.meta +147 -144
  51. package/Editor/Texture/light/red_active.png.meta +147 -144
  52. package/Editor/Texture/light/red_hover.png.meta +147 -144
  53. package/Editor/Texture/light/red_normal.png.meta +147 -144
  54. package/Editor/Texture/light/square_b_active.png.meta +147 -144
  55. package/Editor/Texture/light/square_b_hover.png.meta +147 -144
  56. package/Editor/Texture/light/square_b_normal.png.meta +147 -144
  57. package/Editor/Texture/light/square_g_active.png.meta +147 -144
  58. package/Editor/Texture/light/square_g_hover.png.meta +147 -144
  59. package/Editor/Texture/light/square_g_normal.png.meta +147 -144
  60. package/Editor/Texture/light/square_menu_active.png.meta +147 -144
  61. package/Editor/Texture/light/square_n_active.png.meta +147 -144
  62. package/Editor/Texture/light/square_n_hover.png.meta +147 -144
  63. package/Editor/Texture/light/square_n_normal.png.meta +147 -144
  64. package/Editor/Texture/light/square_r_active.png.meta +147 -144
  65. package/Editor/Texture/light/square_r_hover.png.meta +147 -144
  66. package/Editor/Texture/light/square_r_normal.png.meta +147 -144
  67. package/Editor/Texture/light/square_y_active.png.meta +147 -144
  68. package/Editor/Texture/light/square_y_hover.png.meta +147 -144
  69. package/Editor/Texture/light/square_y_normal.png.meta +147 -144
  70. package/Editor/Texture/light/title_bar.png.meta +147 -144
  71. package/Editor/Texture/light/yellow_active.png.meta +147 -144
  72. package/Editor/Texture/light/yellow_hover.png.meta +147 -144
  73. package/Editor/Texture/light/yellow_normal.png.meta +147 -144
  74. package/Editor/UniEditor.cs +7 -1
  75. package/Runtime/GamePauser.cs +84 -0
  76. package/Runtime/GamePauser.cs.meta +11 -0
  77. package/Runtime/HandleOnAppFocus.cs +14 -0
  78. package/Runtime/HandleOnAppFocus.cs.meta +11 -0
  79. package/Runtime/MiniGameLifecycle.cs +93 -0
  80. package/Runtime/MiniGameLifecycle.cs.meta +11 -0
  81. package/Runtime/Paths.cs +1 -0
  82. package/Runtime/SdkLite.cs +18 -3
  83. package/Sources~/Package/AATool.unitypackage +0 -0
  84. package/Sources~/Package/AATool.unitypackage.manifest +3 -0
  85. package/Sources~/Package/MiniGame.unitypackage +0 -0
  86. package/Sources~/Package//345/270/270/347/224/250/346/211/223/345/214/205/351/205/215/347/275/256.unitypackage +0 -0
  87. package/package.json +1 -1
@@ -1,144 +1,147 @@
1
- fileFormatVersion: 2
2
- guid: ea0600517fd34134ea5a3eafb5706677
3
- TextureImporter:
4
- internalIDToNameTable: []
5
- externalObjects: {}
6
- serializedVersion: 11
7
- mipmaps:
8
- mipMapMode: 0
9
- enableMipMap: 0
10
- sRGBTexture: 1
11
- linearTexture: 0
12
- fadeOut: 0
13
- borderMipMap: 0
14
- mipMapsPreserveCoverage: 0
15
- alphaTestReferenceValue: 0.5
16
- mipMapFadeDistanceStart: 1
17
- mipMapFadeDistanceEnd: 3
18
- bumpmap:
19
- convertToNormalMap: 0
20
- externalNormalMap: 0
21
- heightScale: 0.25
22
- normalMapFilter: 0
23
- isReadable: 0
24
- streamingMipmaps: 0
25
- streamingMipmapsPriority: 0
26
- vTOnly: 0
27
- grayScaleToAlpha: 0
28
- generateCubemap: 6
29
- cubemapConvolution: 0
30
- seamlessCubemap: 0
31
- textureFormat: 1
32
- maxTextureSize: 2048
33
- textureSettings:
34
- serializedVersion: 2
35
- filterMode: 1
36
- aniso: 1
37
- mipBias: 0
38
- wrapU: 0
39
- wrapV: 0
40
- wrapW: 0
41
- nPOTScale: 1
42
- lightmap: 0
43
- compressionQuality: 50
44
- spriteMode: 0
45
- spriteExtrude: 1
46
- spriteMeshType: 1
47
- alignment: 0
48
- spritePivot: {x: 0.5, y: 0.5}
49
- spritePixelsToUnits: 100
50
- spriteBorder: {x: 0, y: 0, z: 0, w: 0}
51
- spriteGenerateFallbackPhysicsShape: 1
52
- alphaUsage: 1
53
- alphaIsTransparency: 1
54
- spriteTessellationDetail: -1
55
- textureType: 0
56
- textureShape: 1
57
- singleChannelComponent: 0
58
- flipbookRows: 1
59
- flipbookColumns: 1
60
- maxTextureSizeSet: 0
61
- compressionQualitySet: 0
62
- textureFormatSet: 0
63
- ignorePngGamma: 0
64
- applyGammaDecoding: 0
65
- platformSettings:
66
- - serializedVersion: 3
67
- buildTarget: DefaultTexturePlatform
68
- maxTextureSize: 2048
69
- resizeAlgorithm: 0
70
- textureFormat: -1
71
- textureCompression: 1
72
- compressionQuality: 50
73
- crunchedCompression: 0
74
- allowsAlphaSplitting: 0
75
- overridden: 0
76
- androidETC2FallbackOverride: 0
77
- forceMaximumCompressionQuality_BC6H_BC7: 0
78
- - serializedVersion: 3
79
- buildTarget: Standalone
80
- maxTextureSize: 2048
81
- resizeAlgorithm: 0
82
- textureFormat: -1
83
- textureCompression: 1
84
- compressionQuality: 50
85
- crunchedCompression: 0
86
- allowsAlphaSplitting: 0
87
- overridden: 0
88
- androidETC2FallbackOverride: 0
89
- forceMaximumCompressionQuality_BC6H_BC7: 0
90
- - serializedVersion: 3
91
- buildTarget: iPhone
92
- maxTextureSize: 2048
93
- resizeAlgorithm: 0
94
- textureFormat: -1
95
- textureCompression: 1
96
- compressionQuality: 50
97
- crunchedCompression: 0
98
- allowsAlphaSplitting: 0
99
- overridden: 0
100
- androidETC2FallbackOverride: 0
101
- forceMaximumCompressionQuality_BC6H_BC7: 0
102
- - serializedVersion: 3
103
- buildTarget: WebGL
104
- maxTextureSize: 2048
105
- resizeAlgorithm: 0
106
- textureFormat: -1
107
- textureCompression: 1
108
- compressionQuality: 50
109
- crunchedCompression: 0
110
- allowsAlphaSplitting: 0
111
- overridden: 0
112
- androidETC2FallbackOverride: 0
113
- forceMaximumCompressionQuality_BC6H_BC7: 0
114
- - serializedVersion: 3
115
- buildTarget: Android
116
- maxTextureSize: 2048
117
- resizeAlgorithm: 0
118
- textureFormat: -1
119
- textureCompression: 1
120
- compressionQuality: 50
121
- crunchedCompression: 0
122
- allowsAlphaSplitting: 0
123
- overridden: 0
124
- androidETC2FallbackOverride: 0
125
- forceMaximumCompressionQuality_BC6H_BC7: 0
126
- spriteSheet:
127
- serializedVersion: 2
128
- sprites: []
129
- outline: []
130
- physicsShape: []
131
- bones: []
132
- spriteID:
133
- internalID: 0
134
- vertices: []
135
- indices:
136
- edges: []
137
- weights: []
138
- secondaryTextures: []
139
- spritePackingTag:
140
- pSDRemoveMatte: 0
141
- pSDShowRemoveMatteOption: 0
142
- userData:
143
- assetBundleName:
144
- assetBundleVariant:
1
+ fileFormatVersion: 2
2
+ guid: 196c5447cf6cc2c4cba0bd744c1cb251
3
+ TextureImporter:
4
+ internalIDToNameTable: []
5
+ externalObjects: {}
6
+ serializedVersion: 12
7
+ mipmaps:
8
+ mipMapMode: 0
9
+ enableMipMap: 1
10
+ sRGBTexture: 1
11
+ linearTexture: 0
12
+ fadeOut: 0
13
+ borderMipMap: 0
14
+ mipMapsPreserveCoverage: 0
15
+ alphaTestReferenceValue: 0.5
16
+ mipMapFadeDistanceStart: 1
17
+ mipMapFadeDistanceEnd: 3
18
+ bumpmap:
19
+ convertToNormalMap: 0
20
+ externalNormalMap: 0
21
+ heightScale: 0.25
22
+ normalMapFilter: 0
23
+ isReadable: 0
24
+ streamingMipmaps: 0
25
+ streamingMipmapsPriority: 0
26
+ vTOnly: 0
27
+ ignoreMasterTextureLimit: 0
28
+ grayScaleToAlpha: 0
29
+ generateCubemap: 6
30
+ cubemapConvolution: 0
31
+ seamlessCubemap: 0
32
+ textureFormat: 1
33
+ maxTextureSize: 2048
34
+ textureSettings:
35
+ serializedVersion: 2
36
+ filterMode: 1
37
+ aniso: 1
38
+ mipBias: 0
39
+ wrapU: 0
40
+ wrapV: 0
41
+ wrapW: 0
42
+ nPOTScale: 1
43
+ lightmap: 0
44
+ compressionQuality: 50
45
+ spriteMode: 0
46
+ spriteExtrude: 1
47
+ spriteMeshType: 1
48
+ alignment: 0
49
+ spritePivot: {x: 0.5, y: 0.5}
50
+ spritePixelsToUnits: 100
51
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
52
+ spriteGenerateFallbackPhysicsShape: 1
53
+ alphaUsage: 1
54
+ alphaIsTransparency: 0
55
+ spriteTessellationDetail: -1
56
+ textureType: 0
57
+ textureShape: 1
58
+ singleChannelComponent: 0
59
+ flipbookRows: 1
60
+ flipbookColumns: 1
61
+ maxTextureSizeSet: 0
62
+ compressionQualitySet: 0
63
+ textureFormatSet: 0
64
+ ignorePngGamma: 0
65
+ applyGammaDecoding: 0
66
+ cookieLightType: 0
67
+ platformSettings:
68
+ - serializedVersion: 3
69
+ buildTarget: DefaultTexturePlatform
70
+ maxTextureSize: 2048
71
+ resizeAlgorithm: 0
72
+ textureFormat: -1
73
+ textureCompression: 1
74
+ compressionQuality: 50
75
+ crunchedCompression: 0
76
+ allowsAlphaSplitting: 0
77
+ overridden: 0
78
+ androidETC2FallbackOverride: 0
79
+ forceMaximumCompressionQuality_BC6H_BC7: 0
80
+ - serializedVersion: 3
81
+ buildTarget: Standalone
82
+ maxTextureSize: 2048
83
+ resizeAlgorithm: 0
84
+ textureFormat: -1
85
+ textureCompression: 1
86
+ compressionQuality: 50
87
+ crunchedCompression: 0
88
+ allowsAlphaSplitting: 0
89
+ overridden: 0
90
+ androidETC2FallbackOverride: 0
91
+ forceMaximumCompressionQuality_BC6H_BC7: 0
92
+ - serializedVersion: 3
93
+ buildTarget: iPhone
94
+ maxTextureSize: 2048
95
+ resizeAlgorithm: 0
96
+ textureFormat: -1
97
+ textureCompression: 1
98
+ compressionQuality: 50
99
+ crunchedCompression: 0
100
+ allowsAlphaSplitting: 0
101
+ overridden: 0
102
+ androidETC2FallbackOverride: 0
103
+ forceMaximumCompressionQuality_BC6H_BC7: 0
104
+ - serializedVersion: 3
105
+ buildTarget: WebGL
106
+ maxTextureSize: 2048
107
+ resizeAlgorithm: 0
108
+ textureFormat: -1
109
+ textureCompression: 1
110
+ compressionQuality: 50
111
+ crunchedCompression: 0
112
+ allowsAlphaSplitting: 0
113
+ overridden: 0
114
+ androidETC2FallbackOverride: 0
115
+ forceMaximumCompressionQuality_BC6H_BC7: 0
116
+ - serializedVersion: 3
117
+ buildTarget: Android
118
+ maxTextureSize: 2048
119
+ resizeAlgorithm: 0
120
+ textureFormat: -1
121
+ textureCompression: 1
122
+ compressionQuality: 50
123
+ crunchedCompression: 0
124
+ allowsAlphaSplitting: 0
125
+ overridden: 0
126
+ androidETC2FallbackOverride: 0
127
+ forceMaximumCompressionQuality_BC6H_BC7: 0
128
+ spriteSheet:
129
+ serializedVersion: 2
130
+ sprites: []
131
+ outline: []
132
+ physicsShape: []
133
+ bones: []
134
+ spriteID:
135
+ internalID: 0
136
+ vertices: []
137
+ indices:
138
+ edges: []
139
+ weights: []
140
+ secondaryTextures: []
141
+ nameFileIdTable: {}
142
+ spritePackingTag:
143
+ pSDRemoveMatte: 0
144
+ pSDShowRemoveMatteOption: 0
145
+ userData:
146
+ assetBundleName:
147
+ assetBundleVariant:
@@ -30,6 +30,12 @@ namespace TyphoonUnitySDK
30
30
  /// </summary>
31
31
  public static string PackagePath_PublishSetting = $"{PathRoot}/Sources~/Package/常用打包配置.unitypackage";
32
32
 
33
+
34
+ /// <summary>
35
+ /// AA拓展工具
36
+ /// </summary>
37
+ public static string PackagePath_AATool = $"{PathRoot}/Sources~/Package/AATool.unitypackage";
38
+
33
39
  /// <summary>
34
40
  /// China Android 资源包
35
41
  /// </summary>
@@ -410,7 +416,7 @@ namespace TyphoonUnitySDK
410
416
  public static void CopyFolder(string source, string dest)
411
417
  {
412
418
  // Debug.Log($"复制文件夹{source}-->{dest}");
413
- source=Path.GetFullPath(source);
419
+ source = Path.GetFullPath(source);
414
420
  dest = Path.GetFullPath(dest);
415
421
  if (!Directory.Exists(dest))
416
422
  {
@@ -0,0 +1,84 @@
1
+ using System.Collections.Generic;
2
+ using UnityEngine;
3
+
4
+ /// <summary>
5
+ /// 游戏暂停器
6
+ /// </summary>
7
+ public class GamePauser
8
+ {
9
+ public HashSet<string> TagsHash = new HashSet<string>();
10
+ private bool IsPaused { get; set; } = false;
11
+ private float TimeScaleBeforePause { get; set; }
12
+ private bool AudioListenerStateBeforePause { get; set; }
13
+
14
+ /// <summary>
15
+ /// 新增暂停标记
16
+ /// </summary>
17
+ /// <param name="tag"></param>
18
+ public void AddPauseTag(string tag)
19
+ {
20
+ if (TagsHash.Contains(tag))
21
+ {
22
+ //已经存在相关标记,不处理
23
+ return;
24
+ }
25
+
26
+ var success = TagsHash.Add(tag);
27
+ if (success)
28
+ {
29
+ OnTagsChanged();
30
+ }
31
+ }
32
+
33
+ /// <summary>
34
+ /// 移除暂停标记
35
+ /// </summary>
36
+ public void RemovePauseTag(string tag)
37
+ {
38
+ var success = TagsHash.Remove(tag);
39
+ if (success)
40
+ {
41
+ OnTagsChanged();
42
+ }
43
+ }
44
+
45
+ private void OnTagsChanged()
46
+ {
47
+ if (TagsHash.Count > 0)
48
+ {
49
+ //暂停
50
+ Pause();
51
+ }
52
+ else
53
+ {
54
+ //恢复
55
+ Resume();
56
+ }
57
+ }
58
+
59
+ private void Pause()
60
+ {
61
+ if (IsPaused)
62
+ {
63
+ return;
64
+ }
65
+
66
+ IsPaused = true;
67
+ TimeScaleBeforePause = Time.timeScale;
68
+ AudioListenerStateBeforePause = AudioListener.pause;
69
+ Time.timeScale = 0f;
70
+ AudioListener.pause = true;
71
+ }
72
+
73
+ private void Resume()
74
+ {
75
+ if (!IsPaused)
76
+ {
77
+ return;
78
+ }
79
+
80
+ IsPaused = false;
81
+ Time.timeScale = TimeScaleBeforePause;
82
+ AudioListener.pause = AudioListenerStateBeforePause;
83
+ }
84
+ }
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: 8e73c1fccd3bd7e4eb1eb27b09d3907c
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,14 @@
1
+ using TyphoonUnitySDK;
2
+ using UnityEngine;
3
+
4
+ public class HandleOnAppFocus : MonoBehaviour
5
+ {
6
+ public void OnApplicationFocus(bool hasFocus)
7
+ {
8
+ switch (AppConfig.Channel)
9
+ {
10
+ case AppChannel.MiniGame:
11
+ break;
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: 1aacca87759a78e47882db7884aa5f85
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,93 @@
1
+ namespace TyphoonUnitySDK
2
+ {
3
+ public interface IMiniGameLifecycle
4
+ {
5
+ /// <summary>
6
+ /// 激励视频播放前
7
+ /// </summary>
8
+ void OnVideoBeforePlay();
9
+
10
+ /// <summary>
11
+ /// 激励视频处理完毕时
12
+ /// </summary>
13
+ void OnVideoComplete(bool isSuccess);
14
+
15
+ /// <summary>
16
+ /// 插页播放前
17
+ /// </summary>
18
+ void OnIntersBeforePlay();
19
+
20
+ /// <summary>
21
+ /// 插页处理完毕时
22
+ /// </summary>
23
+ void OnIntersComplete(bool isSuccess);
24
+
25
+ /// <summary>
26
+ /// 焦点变化时
27
+ /// </summary>
28
+ void OnFocus(bool hasFocus);
29
+ }
30
+
31
+ /// <summary>
32
+ /// 微游生命周期
33
+ /// </summary>
34
+ public class MiniGameLifecycle : IMiniGameLifecycle
35
+ {
36
+ public GamePauser GamePauser = new GamePauser();
37
+ private const string TAG_VIDEO = "video";
38
+ private const string TAG_INTERS = "inters";
39
+ private const string TAG_FOCUS = "focus";
40
+
41
+ /// <summary>
42
+ /// 激励视频播放前
43
+ /// </summary>
44
+ public virtual void OnVideoBeforePlay()
45
+ {
46
+ SdkDebug.Log("[MiniGameLifecycle] OnVideoBeforePlay");
47
+ GamePauser.AddPauseTag(TAG_VIDEO);
48
+ }
49
+
50
+ /// <summary>
51
+ /// 激励视频处理完毕时
52
+ /// </summary>
53
+ public virtual void OnVideoComplete(bool isSuccess)
54
+ {
55
+ SdkDebug.Log($"[MiniGameLifecycle] OnVideoComplete isSuccess = {isSuccess}");
56
+ GamePauser.RemovePauseTag(TAG_VIDEO);
57
+ }
58
+
59
+ /// <summary>
60
+ /// 插页播放前
61
+ /// </summary>
62
+ public virtual void OnIntersBeforePlay()
63
+ {
64
+ SdkDebug.Log("[MiniGameLifecycle] OnVideoComplete");
65
+ GamePauser.AddPauseTag(TAG_INTERS);
66
+ }
67
+
68
+ /// <summary>
69
+ /// 插页处理完毕时
70
+ /// </summary>
71
+ public virtual void OnIntersComplete(bool isSuccess)
72
+ {
73
+ SdkDebug.Log($"[MiniGameLifecycle] OnVideoComplete isSuccess = {isSuccess}");
74
+ GamePauser.RemovePauseTag(TAG_INTERS);
75
+ }
76
+
77
+ /// <summary>
78
+ /// 焦点变化时
79
+ /// </summary>
80
+ public virtual void OnFocus(bool hasFocus)
81
+ {
82
+ SdkDebug.Log($"[MiniGameLifecycle] OnFocus hasFocus = {hasFocus}");
83
+ if (hasFocus)
84
+ {
85
+ GamePauser.RemovePauseTag(TAG_FOCUS);
86
+ }
87
+ else
88
+ {
89
+ GamePauser.AddPauseTag(TAG_FOCUS);
90
+ }
91
+ }
92
+ }
93
+ }
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: c90fe651d7f41c34a8f8d89edb46dd6c
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
package/Runtime/Paths.cs CHANGED
@@ -13,5 +13,6 @@ namespace TyphoonUnitySDK
13
13
 
14
14
  return "Assets/com.typhoon.unitysdk";
15
15
  }
16
+ public static string WasmOptExe => $"{GetRoot()}/Sources~/Tool/wasm-opt.exe";
16
17
  }
17
18
  }
@@ -37,6 +37,24 @@ namespace TyphoonUnitySDK
37
37
  OnHide?.Invoke();
38
38
  }
39
39
 
40
+ #region 生命周期
41
+
42
+ /// <summary>
43
+ /// 微游渠道生命周期相关函数
44
+ /// </summary>
45
+ public static IMiniGameLifecycle MiniGameLifecycle { get; set; }
46
+
47
+ /// <summary>
48
+ /// 覆盖微游生命周期
49
+ /// </summary>
50
+ /// <param name="lifecycle"></param>
51
+ public static void OverrideMiniGameLifecycle(IMiniGameLifecycle lifecycle)
52
+ {
53
+ MiniGameLifecycle = lifecycle;
54
+ }
55
+
56
+ #endregion
57
+
40
58
  /*绑定SDK实例*/
41
59
  public static Dictionary<AppChannel, string> SDKBindings = new Dictionary<AppChannel, string>
42
60
  {
@@ -73,7 +91,6 @@ namespace TyphoonUnitySDK
73
91
  }
74
92
  }
75
93
 
76
-
77
94
  protected override void Init()
78
95
  {
79
96
  base.Init();
@@ -114,7 +131,6 @@ namespace TyphoonUnitySDK
114
131
  }
115
132
  }
116
133
 
117
-
118
134
  private IOnPayCallback CreateOnPayCallbackInstance()
119
135
  {
120
136
  var type = GetType(PAY_CALL_BACK_CLASS_NAME);
@@ -864,7 +880,6 @@ namespace TyphoonUnitySDK
864
880
 
865
881
  #endregion
866
882
 
867
-
868
883
  #region 事件上报
869
884
 
870
885
  /// <summary>
@@ -0,0 +1,3 @@
1
+ Assets/Typhoon_Gen/TyphoonSDK/Editor/AATool
2
+ Assets/Typhoon_Gen/TyphoonSDK/Editor/AATool/AddressableTool.cs
3
+ Assets/Typhoon_Gen/TyphoonSDK/Editor/AATool/AddressableTool.cs.meta
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"com.typhoon.unitysdk","displayName":"typhoon unity sdk","version":"1.1.15","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"}],"version_log":"## [1.1.15] - 2025-08-09\r\n\r\n### 修复\n* 修复测试参数bug\r\n\r\n","major_flag":false,"write_time_stamp":1754673872000,"others":{"items":[]},"dependencies":{"com.unity.nuget.newtonsoft-json":"2.0.0"}}
1
+ {"name":"com.typhoon.unitysdk","displayName":"typhoon unity sdk","version":"1.1.17","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"}],"version_log":"## [1.1.17] - 2025-08-13\r\n\r\n### 新增\n* 拆分出AATool\r\n\r\n","major_flag":false,"write_time_stamp":1755068529000,"others":{"items":[]},"dependencies":{"com.unity.nuget.newtonsoft-json":"2.0.0"}}