[M] iOS add UnityKnowNew pay method

This commit is contained in:
2024-08-06 20:36:33 +08:00
parent dfe606d71a
commit d2f1da88f1
5 changed files with 19 additions and 7 deletions

View File

@@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1 m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0} m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0} m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.12731749, g: 0.13414757, b: 0.1210787, a: 1} m_IndirectSpecularColor: {r: 0.12733836, g: 0.13418846, b: 0.12118524, a: 1}
m_UseRadianceAmbientProbe: 0 m_UseRadianceAmbientProbe: 0
--- !u!157 &3 --- !u!157 &3
LightmapSettings: LightmapSettings:
@@ -2186,7 +2186,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 1} m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1} m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 0, y: -55} m_AnchoredPosition: {x: 0, y: -120}
m_SizeDelta: {x: 800, y: 100} m_SizeDelta: {x: 800, y: 100}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2070325010 --- !u!114 &2070325010

View File

@@ -26,6 +26,7 @@ public class SDKTest : MonoBehaviour
void Start() void Start()
{ {
TYSdkFacade.Instance.Init();
_loginGuestBtn.onClick.AddListener(() => OnLogin(EAccoutType.hwGuest)); _loginGuestBtn.onClick.AddListener(() => OnLogin(EAccoutType.hwGuest));
_loginGoogleBtn.onClick.AddListener(() => OnLogin(EAccoutType.hwGoogle)); _loginGoogleBtn.onClick.AddListener(() => OnLogin(EAccoutType.hwGoogle));
_loginFbBtn.onClick.AddListener(() => OnLogin(EAccoutType.hwFacebook)); _loginFbBtn.onClick.AddListener(() => OnLogin(EAccoutType.hwFacebook));

View File

@@ -3,7 +3,6 @@
#import <XYSDK/XYSDK.h> #import <XYSDK/XYSDK.h>
#define TOKEN_ERROR @"-8" #define TOKEN_ERROR @"-8"
extern "C" { extern "C" {
NSString* DicTojsonString(NSDictionary *dict) NSString* DicTojsonString(NSDictionary *dict)
@@ -126,6 +125,13 @@ extern "C" {
} }
//支付 new
void UnityKnowNew(const char* productId, const char* productPrice, const char* productName,
const char* productCount, const char* prodorderId, const char* appInfo, const char* pType)
{
}
//打点 //打点
void SetGaUserInfo(const char* userId) void SetGaUserInfo(const char* userId)
{ {

View File

@@ -30,16 +30,21 @@ namespace tysdk
if (_instance == null) if (_instance == null)
{ {
_instance = new GameObject("TYSdkFacade").AddComponent<TYSdkFacade>(); _instance = new GameObject("TYSdkFacade").AddComponent<TYSdkFacade>();
Init();
DontDestroyOnLoad(_instance.gameObject); DontDestroyOnLoad(_instance.gameObject);
} }
return _instance; return _instance;
} }
} }
public static void Init() public void Init()
{ {
#if UNITY_ANDROID
UnityBridgeFunc.InitSDK(); UnityBridgeFunc.InitSDK();
#endif
}
public void InitAfterLogin()
{
} }

View File

@@ -96,7 +96,7 @@ namespace tysdk
{ {
if (!IsLoggedIn) return new SKUDetail() { code = "-1", msg = "未登录" }; if (!IsLoggedIn) return new SKUDetail() { code = "-1", msg = "未登录" };
#if UNITY_EDITOR #if UNITY_EDITOR || UNITY_IOS
await Task.Yield(); await Task.Yield();
var result = new SKUDetail(); var result = new SKUDetail();
return result; return result;
@@ -130,4 +130,4 @@ namespace tysdk
} }
} }
} }
} }