com.xd.sdk.common 7.1.2 → 7.2.1-alpha
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.
- package/Editor/Steam/SteamBuildProcessor.cs +1 -4
- package/Editor/XD.SDK.Common.Editor.asmdef +2 -1
- package/Plugins/Android/libs/{XDGBridgeCommon_v7_7.1.2.aar → XDGBridgeCommon_v7_7.2.0.aar} +0 -0
- package/Plugins/Android/libs/XDGCommon_7.2.0.aar +0 -0
- package/Plugins/Android/libs/{XDGTapTapWrapperInternal_7.1.2.aar → XDGTapTapWrapperInternal_7.2.0.aar} +0 -0
- package/Plugins/Android/libs/{XDTapTapWrapper_7.1.2.aar → XDTapTapWrapper_7.2.0.aar} +0 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/dark/tap_profile_chat.png.meta +7 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/dark/tap_profile_invite.png.meta +7 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/dark/tap_profile_unfollow.png.meta +7 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/dark.meta +8 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/light/tap_profile_chat.png.meta +7 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/light/tap_profile_invite.png.meta +7 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/light/tap_profile_unfollow.png.meta +7 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/light.meta +8 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/tap_profile_achievement.png.meta +7 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/tap_profile_achievement_platinum.png.meta +7 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/tap_profile_arrow.png.meta +7 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/tap_profile_close.png.meta +7 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/tap_profile_default_background.png.meta +7 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile/tap_profile_logo.png.meta +7 -0
- package/Plugins/iOS/Resource/TapTapLoginResource.bundle/userProfile.meta +8 -0
- package/Plugins/iOS/XDCommonSDK.framework/Headers/NSError+XDG.h +1 -0
- package/Plugins/iOS/XDCommonSDK.framework/Headers/TDSGlobalRouterSchemes.h +2 -0
- package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGCloudLogHelper.h +4 -0
- package/Plugins/iOS/XDCommonSDK.framework/Headers/XDTapTapInfo.h +3 -0
- package/Plugins/iOS/XDCommonSDK.framework/Headers/XDVersion.h +3 -3
- package/Plugins/iOS/XDCommonSDK.framework/Info.plist +0 -0
- package/Plugins/iOS/XDCommonSDK.framework/XDCommonSDK +0 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/Headers/XDTapSDK4WrapperSDK-Swift.h +1 -1
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/Headers/XDTapSDK4WrapperSDK.h +3 -3
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/Info.plist +0 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/Modules/XDTapSDK4WrapperSDK.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/Modules/XDTapSDK4WrapperSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/Modules/XDTapSDK4WrapperSDK.swiftmodule/arm64-apple-ios.swiftmodule +0 -0
- package/Plugins/iOS/XDTapSDK4WrapperSDK.framework/XDTapSDK4WrapperSDK +0 -0
- package/Resources/Localization/LocalizableString.json +56 -56
- package/Resources/Prefabs/AccountCell.prefab +24 -15
- package/Resources/Prefabs/AgreementOptionAll.prefab +15 -9
- package/Resources/Prefabs/AgreementOptionNormal.prefab +16 -10
- package/Resources/Prefabs/AreaCodeCell.prefab +13 -8
- package/Resources/Prefabs/CancelAccountAlert.prefab +23 -23
- package/Resources/Prefabs/CenterErrorView.prefab +8 -8
- package/Resources/Prefabs/ConfirmDialog.prefab +20 -20
- package/Resources/Prefabs/DeleteAccountAlert.prefab +48 -45
- package/Resources/Prefabs/DeleteCell.prefab +6 -6
- package/Resources/Prefabs/Dialog.prefab +24 -24
- package/Resources/Prefabs/DisagreeConfirmAlert.prefab +15 -15
- package/Resources/Prefabs/GeneralAgreementAlert.prefab +53 -31
- package/Resources/Prefabs/LoadFailedView.prefab +12 -12
- package/Resources/Prefabs/LoadingView.prefab +9 -6
- package/Resources/Prefabs/PayHintAlert.prefab +17 -15
- package/Resources/Prefabs/PayLoadFailedView.prefab +13 -13
- package/Resources/Prefabs/PaymentAlert.prefab +9 -5
- package/Resources/Prefabs/SmallLoadingView.prefab +4 -4
- package/Resources/Prefabs/UserCenterAlert.prefab +76 -46
- package/Resources/Prefabs/XDCodeUnbindAlert.prefab +56 -34
- package/Resources/Prefabs/XDEmailAlert.prefab +84 -49
- package/Resources/Prefabs/XDPhoneAlertIO.prefab +129 -65
- package/Resources/Prefabs/XDPhoneNumberInputAlert.prefab +46 -28
- package/Resources/Prefabs/XDRiskControlAlert.prefab +12 -7
- package/Resources/Prefabs/XDSDKUI.prefab +3 -3
- package/Resources/Prefabs/XDVerifyCodeInputAlert.prefab +47 -28
- package/Resources/Prefabs/XDWebBridgeView.prefab +11 -11
- package/Resources/Prefabs/XDWebViewAlert.prefab +10 -10
- package/Resources/Shaders/UI/UI-Default-Gamma.shader +129 -0
- package/Resources/Shaders/UI/UI-Default-Gamma.shader.meta +9 -0
- package/Resources/Shaders/UI/UI_Default-Gamma.mat +36 -0
- package/Resources/Shaders/UI/UI_Default-Gamma.mat.meta +8 -0
- package/Resources/Shaders/UI/UI_Default-Mask.mat +36 -0
- package/Resources/Shaders/UI/UI_Default-Mask.mat.meta +8 -0
- package/Resources/Shaders/UI.meta +8 -0
- package/Resources/Shaders.meta +8 -0
- package/Runtime/Internal/Events/XDGEventBus.cs +135 -13
- package/Runtime/Internal/Standalone/CommonFeaturesImpl.cs +2 -2
- package/Runtime/Internal/Standalone/Http/Interceptor/MacAuthenticationInterceptor.cs +4 -4
- package/Runtime/Internal/Standalone/Steam/SteamManager.cs +358 -0
- package/Runtime/Internal/Standalone/Steam/SteamManager.cs.meta +8 -0
- package/Runtime/Internal/Standalone/{Utils → Steam}/SteamWrapper.cs +48 -49
- package/Runtime/Internal/Standalone/Track/AliyunTrack.cs +36 -29
- package/Runtime/Internal/Standalone/UI/Base/UIManager.cs +1 -1
- package/Runtime/Internal/Standalone/UI/Base/XDGCommonUIResources.cs +107 -0
- package/Runtime/Internal/Standalone/{Steam/SteamUtils.cs.meta → UI/Base/XDGCommonUIResources.cs.meta} +1 -1
- package/Runtime/Internal/Standalone/Web/Function/CloseWebFunction.cs +10 -1
- package/Runtime/Internal/Standalone/Web/WebRequest.cs +1 -1
- package/package.json +2 -2
- package/Plugins/Android/libs/XDGCommon_7.1.2.aar +0 -0
- package/Runtime/Internal/Standalone/Steam/SteamUtils.cs +0 -48
- /package/Plugins/Android/libs/{XDGBridgeCommon_v7_7.1.2.aar.meta → XDGBridgeCommon_v7_7.2.0.aar.meta} +0 -0
- /package/Plugins/Android/libs/{XDGCommon_7.1.2.aar.meta → XDGCommon_7.2.0.aar.meta} +0 -0
- /package/Plugins/Android/libs/{XDGTapTapWrapperInternal_7.1.2.aar.meta → XDGTapTapWrapperInternal_7.2.0.aar.meta} +0 -0
- /package/Plugins/Android/libs/{XDTapTapWrapper_7.1.2.aar.meta → XDTapTapWrapper_7.2.0.aar.meta} +0 -0
- /package/Runtime/Internal/Standalone/{Utils → Steam}/SteamWrapper.cs.meta +0 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
#if UNITY_EDITOR || UNITY_STANDALONE
|
|
2
|
+
using UnityEngine;
|
|
3
|
+
|
|
4
|
+
namespace XD.SDK.Common.Internal.Standalone
|
|
5
|
+
{
|
|
6
|
+
/// <summary>
|
|
7
|
+
/// 提供 Common 模块内部统一使用的 UI 材质访问接口。
|
|
8
|
+
/// 默认会优先根据当前 ColorSpace 选择对应的材质,如果找不到 Linear 版本则回退到 Gamma 版本。
|
|
9
|
+
/// 实际材质文件放在任意包的 Resources/Shaders/UI 目录下即可(例如 Common 或 BuildTools),
|
|
10
|
+
/// 但路径必须保持与常量中定义的一致。
|
|
11
|
+
/// </summary>
|
|
12
|
+
public static class XDGCommonUIResources
|
|
13
|
+
{
|
|
14
|
+
// 贴图渲染用的默认 UI 材质
|
|
15
|
+
private const string SpriteGammaPath = "Shaders/UI/UI_Default-Gamma";
|
|
16
|
+
private const string SpriteLinearPath = "Shaders/UI/UI_Default-Linear";
|
|
17
|
+
|
|
18
|
+
// 蒙版用的默认 UI 材质
|
|
19
|
+
private const string MaskGammaPath = "Shaders/UI/UI_Default-Mask";
|
|
20
|
+
private const string MaskLinearPath = "Shaders/UI/UI_Default-Mask-Linear";
|
|
21
|
+
|
|
22
|
+
private static Material spriteGamma;
|
|
23
|
+
private static Material spriteLinear;
|
|
24
|
+
|
|
25
|
+
private static Material maskGamma;
|
|
26
|
+
private static Material maskLinear;
|
|
27
|
+
|
|
28
|
+
/// <summary>
|
|
29
|
+
/// 获取当前 ColorSpace 下推荐使用的 UI Sprite 材质。
|
|
30
|
+
/// </summary>
|
|
31
|
+
public static Material GetDefaultSpriteMaterial()
|
|
32
|
+
{
|
|
33
|
+
if (QualitySettings.activeColorSpace == ColorSpace.Linear)
|
|
34
|
+
{
|
|
35
|
+
if (spriteLinear == null)
|
|
36
|
+
{
|
|
37
|
+
spriteLinear = LoadMaterialWithFallback(SpriteLinearPath, SpriteGammaPath, "Sprite Linear");
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (spriteLinear != null)
|
|
41
|
+
{
|
|
42
|
+
return spriteLinear;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (spriteGamma == null)
|
|
47
|
+
{
|
|
48
|
+
spriteGamma = LoadMaterial(SpriteGammaPath, "Sprite Gamma");
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return spriteGamma;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/// <summary>
|
|
55
|
+
/// 获取当前 ColorSpace 下推荐使用的 UI Mask 材质。
|
|
56
|
+
/// </summary>
|
|
57
|
+
internal static Material GetDefaultMaskMaterial()
|
|
58
|
+
{
|
|
59
|
+
if (QualitySettings.activeColorSpace == ColorSpace.Linear)
|
|
60
|
+
{
|
|
61
|
+
if (maskLinear == null)
|
|
62
|
+
{
|
|
63
|
+
maskLinear = LoadMaterialWithFallback(MaskLinearPath, MaskGammaPath, "Mask Linear");
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (maskLinear != null)
|
|
67
|
+
{
|
|
68
|
+
return maskLinear;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (maskGamma == null)
|
|
73
|
+
{
|
|
74
|
+
maskGamma = LoadMaterial(MaskGammaPath, "Mask Gamma");
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return maskGamma;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
private static Material LoadMaterialWithFallback(string primaryPath, string fallbackPath, string label)
|
|
81
|
+
{
|
|
82
|
+
Material material = LoadMaterial(primaryPath, label);
|
|
83
|
+
if (material != null)
|
|
84
|
+
{
|
|
85
|
+
return material;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return LoadMaterial(fallbackPath, label + " Fallback");
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
private static Material LoadMaterial(string path, string label)
|
|
92
|
+
{
|
|
93
|
+
Material material = Resources.Load<Material>(path);
|
|
94
|
+
if (material == null)
|
|
95
|
+
{
|
|
96
|
+
Debug.LogWarning(
|
|
97
|
+
"[XDGCommonUIResources] 未找到 UI 材质: \"" + label +
|
|
98
|
+
"\",Resources 路径: \"" + path + "\"");
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return material;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
#endif
|
|
106
|
+
|
|
107
|
+
|
|
@@ -16,7 +16,16 @@ namespace XD.SDK.Common.Internal.Standalone
|
|
|
16
16
|
{
|
|
17
17
|
XDGLogger.Debug($"message from javascript by:{GetName()} with data:{data}", XDGLoggerTag.Web);
|
|
18
18
|
var dic = JsonConvert.DeserializeObject<Dictionary<string, object>>(data);
|
|
19
|
-
|
|
19
|
+
if (webView?.ProviderWebView()?.Url != null)
|
|
20
|
+
{
|
|
21
|
+
var url = webView?.ProviderWebView()?.Url;
|
|
22
|
+
var queryParams = WebRequest.ParseQueryString(url);
|
|
23
|
+
var noUI = WebRequest.GetValueOrDefault(queryParams, "xdNoUI", "0") == "1";
|
|
24
|
+
if (!noUI)
|
|
25
|
+
{
|
|
26
|
+
UIManager.Dismiss();
|
|
27
|
+
}
|
|
28
|
+
}
|
|
20
29
|
webView?.ProviderWebTrans()?.TransObserver(WebActionEnum.CLOSE, dic);
|
|
21
30
|
webView?.Release();
|
|
22
31
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "com.xd.sdk.common",
|
|
3
3
|
"displayName": "XDGSDK Common",
|
|
4
|
-
"version": "7.1
|
|
4
|
+
"version": "7.2.1-alpha",
|
|
5
5
|
"description": "XDGSDK",
|
|
6
6
|
"unity": "2019.3",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"com.xd.sdk.foundation": "7.1
|
|
9
|
+
"com.xd.sdk.foundation": "7.2.1-alpha"
|
|
10
10
|
}
|
|
11
11
|
}
|
|
Binary file
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
#if UNITY_EDITOR || UNITY_STANDALONE
|
|
2
|
-
using System;
|
|
3
|
-
using System.Linq;
|
|
4
|
-
using System.Threading.Tasks;
|
|
5
|
-
using UnityEngine;
|
|
6
|
-
|
|
7
|
-
namespace XD.SDK.Common.Internal.Standalone
|
|
8
|
-
{
|
|
9
|
-
/// <summary>
|
|
10
|
-
/// Steam SDK 封装接口
|
|
11
|
-
/// </summary>
|
|
12
|
-
public interface ISteamSDKWrapper
|
|
13
|
-
{
|
|
14
|
-
Task<string> GetAuthTicket();
|
|
15
|
-
string GetSteamId();
|
|
16
|
-
string GetSteamLanguage();
|
|
17
|
-
Task<string> GetMicroTxn(ulong orderId);
|
|
18
|
-
string GetSteamCountry();
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
public class SteamUtils
|
|
22
|
-
{
|
|
23
|
-
public static ISteamSDKWrapper Instance { get; private set; }
|
|
24
|
-
|
|
25
|
-
static SteamUtils()
|
|
26
|
-
{
|
|
27
|
-
Type interfaceType = typeof(ISteamSDKWrapper);
|
|
28
|
-
Type steamWrapperType = AppDomain.CurrentDomain.GetAssemblies()
|
|
29
|
-
.SelectMany(assembly => assembly.GetTypes())
|
|
30
|
-
.FirstOrDefault(clazz => interfaceType.IsAssignableFrom(clazz) && clazz.IsClass);
|
|
31
|
-
if (steamWrapperType != null)
|
|
32
|
-
{
|
|
33
|
-
Instance = Activator.CreateInstance(steamWrapperType) as ISteamSDKWrapper;
|
|
34
|
-
}
|
|
35
|
-
else
|
|
36
|
-
{
|
|
37
|
-
XDGLogger.Warn($"No class implements {interfaceType} Type. Current Platform: {Application.platform}, if you are using Editor, please check if you have installed XDSDK pc module.", XDGLoggerTag.Common);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/// <summary>
|
|
42
|
-
/// 是否有 SDK 支持,即 Steam 包
|
|
43
|
-
/// </summary>
|
|
44
|
-
public static bool IsSDKSupported => Instance != null;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
#endif
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/Plugins/Android/libs/{XDTapTapWrapper_7.1.2.aar.meta → XDTapTapWrapper_7.2.0.aar.meta}
RENAMED
|
File without changes
|
|
File without changes
|