// "do nothing"; #endif public CSSDKCall() { CSSDKObject.getInstance(); #if UNITY_IOS && !UNITY_EDITOR setCallbackWithClassAndFunctionForIosCssdk(CSSDKObject.Unity_Callback_Class_Name, CSSDKObject.Unity_Callback_Function_Name); Debug.Log("===> CSSDKCall instanced."); #elif UNITY_ANDROID && !UNITY_EDITOR if (jc == null) { Debug.Log("===> CSSDKCall instanced."); jc = new AndroidJavaClass(JavaClassName); } #endif }
public void haveNewMessageCall(Action <bool, string> callback) { Debug.Log("===> call haveNewMessage in CSSDKcall"); // 设置callback回调 CSSDKObject.getInstance().setHaveNewMessageCallbackCallback(callback); // 调用原生的方法 #if UNITY_IOS && !UNITY_EDITOR haveNewMessageForIosCssdk(); #elif UNITY_ANDROID && !UNITY_EDITOR if (jc != null) { jc.CallStatic(JavaClassStaticMethod_setNewReplayCallback, CSSDKObject.Unity_Callback_Class_Name, CSSDKObject.Unity_Callback_Function_Name); } #endif }