コード例 #1
0
        public static void start(AdjustConfig adjustConfig)
        {
            if (Adjust.instance != null)
            {
                Debug.Log("adjust: Error, SDK already started.");
                return;
            }

            if (adjustConfig == null)
            {
                Debug.Log("adjust: Missing config to start.");
                return;
            }

                        #if UNITY_EDITOR
            Adjust.instance = null;
                        #elif UNITY_IOS
            Adjust.instance = new AdjustiOS();
                        #elif UNITY_ANDROID
            Adjust.instance = new AdjustAndroid();
                        #else
            Adjust.instance = null;
                        #endif

            if (Adjust.instance == null)
            {
                Debug.Log("adjust: SDK can only be used in Android, iOS, Windows Phone 8 or Windows Store apps.");
                return;
            }

            adjustConfig.setSdkPrefix(Adjust.sdkPrefix);
            Adjust.attributionChangedDelegate = adjustConfig.getAttributionChangedDelegate();

            Adjust.instance.start(adjustConfig);
        }
コード例 #2
0
ファイル: Adjust.cs プロジェクト: tengontheway/unity_sdk
        public static void start(AdjustConfig adjustConfig)
        {
            if (Adjust.instance != null) {
                Debug.Log ("adjust: Error, SDK already started.");
                return;
            }

            if (adjustConfig == null) {
                Debug.Log ("adjust: Missing config to start.");
                return;
            }

            #if UNITY_EDITOR
                Adjust.instance = null;
            #elif UNITY_IOS
                Adjust.instance = new AdjustiOS();
            #elif UNITY_ANDROID
                Adjust.instance = new AdjustAndroid();
            #else
                Adjust.instance = null;
            #endif

            if (Adjust.instance == null) {
                Debug.Log ("adjust: SDK can only be used in Android, iOS, Windows Phone 8 or Windows Store apps.");
                return;
            }

            adjustConfig.setSdkPrefix(Adjust.sdkPrefix);
            Adjust.attributionChangedDelegate = adjustConfig.getAttributionChangedDelegate ();

            Adjust.instance.start (adjustConfig);
        }