public static AASDKObject getInstance()
        {
            if (instance == null)
            {
                GameObject polyCallback = new GameObject(Unity_Callback_Class_Name);
                polyCallback.hideFlags = HideFlags.HideAndDontSave;
                DontDestroyOnLoad(polyCallback);

                instance = polyCallback.AddComponent <AASDKObject> ();
            }
            return(instance);
        }
Exemplo n.º 2
0
        // "do nothing";
#endif



        public AASDKCall()
        {
            AASDKObject.getInstance();
#if UNITY_IOS && !UNITY_EDITOR
            Debug.Log("===> AASDKCall instanced.");
#elif UNITY_ANDROID && !UNITY_EDITOR
            if (jc == null)
            {
                Debug.Log("===> AASDKCall instanced.");
                jc = new AndroidJavaClass(JavaClassName);
            }
#endif
        }
Exemplo n.º 3
0
        public void getAAUTokenData(Action <string, string> success, Action <string> fail)
        {
            // 设置callback回调
            AASDKObject.getInstance().setTokenLoginCallback(success, fail);
            // 调用原生的方法
#if UNITY_IOS && !UNITY_EDITOR
            getConversionDataForIos(UPTraceObject.Unity_Callback_Class_Name, UPTraceObject.Unity_Callback_Function_Name, afConversionData);
#elif UNITY_ANDROID && !UNITY_EDITOR
            if (jc != null)
            {
                jc.CallStatic(JavaClassStaticMethod_AAUTokenLogin);
            }
#endif
        }