/// <summary> /// sdk的登陆接口 /// </summary> public void LoginSDK() { #if UNITY_ANDROID //TD_info.setLogin();//TD接入进入游戏 AndroidJavaClass jc = new AndroidJavaClass("com.unity3d.player.UnityPlayer"); AndroidJavaObject jo = jc.GetStatic <AndroidJavaObject>("currentActivity"); jo.Call("doLYLogin"); #elif UNITY_IPHONE // Debug.Log("Unity--------LoginSDK-------------"); #if SDK_AZ #elif SDK_JYIOS SdkConector.NdLogin(); #elif SDK_ITOOLS ItoolsSdkControl.ItoolSDKLogin(); #elif SDK_KUAIYONG KYSdkControl.KYSDKLogin(); #elif SDK_XY XYSDKControl.XYSDKLogin(); #elif SDK_I4 ASSDKControl.ASSDKLogin(); #elif SDK_ZSY ZSYSDKControl.ZSYSDKLogin(); #elif SDK_ZSYIOS ZSYSDKControl.ZSYSDKLogin(); #elif SDK_PP PPSdkControl.PPSdkLogin(); #elif SDK_TONGBU TBSdkControl.TBSdkLogin(); #elif SDK_HM HMSdkControl.HMSdkLogin(); #endif #endif }
private static string appkey = "8148112b941e470f8bcbe72532e82091"; // TODO: 设置APPKEY #endif void Start() { #if UNITY_IPHONE #if SDK_AZ #elif SDK_JYIOS SdkConector.NdInit(); SdkConector.NdSetUnityReceiver(this.transform.name); #elif SDK_ITOOLS if (ItoolsSdkControl.isInit == false) { ItoolsSdkControl.ItoolSDKInit(appid, appkey); ItoolsSdkControl.isInit = true; } ItoolsSdkControl.ItoolSDKSetUnityReceiver(this.transform.name); #elif SDK_KUAIYONG if (KYSdkControl.isInit == false) { KYSdkControl.KYSDKInit(); KYSdkControl.isInit = true; } KYSdkControl.KYSDKSetUnityReceiver(this.transform.name); #elif SDK_XY if (XYSDKControl.isInit == false) { XYSDKControl.XYSDKInit(appid, appkey); XYSDKControl.isInit = true; } XYSDKControl.XYSDKSetUnityReceiver(this.transform.name); #elif SDK_I4 ASSDKControl.ASSDKInit(appid, appkey); ASSDKControl.ASSDKSetUnityReceiver(this.transform.name); #elif SDK_ZSY if (ZSYSDKControl.isInit == false) { ZSYSDKControl.isInit = true; ZSYSDKControl.ZSYSDKInit(); } ZSYSDKControl.ZSYSDKSetUnityReceiver(this.transform.name); #elif SDK_ZSYIOS if (ZSYSDKControl.isInit == false) { ZSYSDKControl.isInit = true; ZSYSDKControl.ZSYSDKInit(); } ZSYSDKControl.ZSYSDKSetUnityReceiver(this.transform.name); #elif SDK_PP if (PPSdkControl.isInit == false) { PPSdkControl.isInit = true; PPSdkControl.PPSdkInit(); } PPSdkControl.PPSdkSetUnityReceiver(this.transform.name); #elif SDK_TONGBU if (TBSdkControl.isInit == false) { TBSdkControl.isInit = true; TBSdkControl.TBSdkInit(); } TBSdkControl.TBSdkSetUnityReceiver(this.transform.name); #elif SDK_HM if (HMSdkControl.isInit == false) { HMSdkControl.isInit = true; HMSdkControl.HMSdkInit(); } HMSdkControl.HMSdkSetUnityReceiver(this.transform.name); #endif #endif }