Example #1
0
        /**
         * @brief set pListener The callback object for push result
         * @param the MonoBehaviour object
         * @param the callback of function
         */

        public void setListener(MonoBehaviour gameObject, string functionName)
        {
#if UNITY_ANDROID
            AnySDKUtil.registerActionCallback(AnySDKType.Push, gameObject, functionName);
#elif UNITY_IOS
            string gameObjectName = gameObject.gameObject.name;
            AnySDKPush_nativeSetListener(gameObjectName, functionName);
#else
            Debug.Log("This platform does not support!");
#endif
        }
 public void setListener(MonoBehaviour gameObject, string functionName)
 {
     AnySDKUtil.registerActionCallback(AnySDKType.Social, gameObject, functionName);
 }