[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_CustomReflection: {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
--- !u!157 &3
LightmapSettings:
@@ -2186,7 +2186,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {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_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2070325010

View File

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

View File

@@ -3,7 +3,6 @@
#import <XYSDK/XYSDK.h>
#define TOKEN_ERROR @"-8"
extern "C" {
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)
{

View File

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

View File

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