Ejemplo n.º 1
0
        void Awake()
        {
            if (Adjust.instance != null)
            {
                return;
            }

            DontDestroyOnLoad(transform.gameObject);

            if (!this.startManually)
            {
                AdjustConfig adjustConfig = new AdjustConfig(this.appToken, this.environment);
                adjustConfig.setLogLevel(this.logLevel);
                adjustConfig.setEventBufferingEnabled(eventBuffering);

                if (printAttribution)
                {
                    adjustConfig.setEventSuccessDelegate(EventSuccessCallback);
                    adjustConfig.setEventFailureDelegate(EventFailureCallback);
                    adjustConfig.setSessionSuccessDelegate(SessionSuccessCallback);
                    adjustConfig.setSessionFailureDelegate(SessionFailureCallback);
                    adjustConfig.setAttributionChangedDelegate(AttributionChangedCallback);
                }

                Adjust.start(adjustConfig);
            }
        }
Ejemplo n.º 2
0
 // Token: 0x06000071 RID: 113 RVA: 0x00003E18 File Offset: 0x00002218
 private void Awake()
 {
     if (Adjust.instance != null)
     {
         return;
     }
     UnityEngine.Object.DontDestroyOnLoad(base.transform.gameObject);
     if (!this.startManually)
     {
         AdjustConfig adjustConfig = new AdjustConfig(this.appToken, this.environment, this.logLevel == AdjustLogLevel.Suppress);
         adjustConfig.setLogLevel(this.logLevel);
         adjustConfig.setSendInBackground(this.sendInBackground);
         adjustConfig.setEventBufferingEnabled(this.eventBuffering);
         adjustConfig.setLaunchDeferredDeeplink(this.launchDeferredDeeplink);
         if (this.printAttribution)
         {
             adjustConfig.setEventSuccessDelegate(new Action <AdjustEventSuccess>(this.EventSuccessCallback), "Adjust");
             adjustConfig.setEventFailureDelegate(new Action <AdjustEventFailure>(this.EventFailureCallback), "Adjust");
             adjustConfig.setSessionSuccessDelegate(new Action <AdjustSessionSuccess>(this.SessionSuccessCallback), "Adjust");
             adjustConfig.setSessionFailureDelegate(new Action <AdjustSessionFailure>(this.SessionFailureCallback), "Adjust");
             adjustConfig.setDeferredDeeplinkDelegate(new Action <string>(this.DeferredDeeplinkCallback), "Adjust");
             adjustConfig.setAttributionChangedDelegate(new Action <AdjustAttribution>(this.AttributionChangedCallback), "Adjust");
         }
         Adjust.start(adjustConfig);
     }
 }
Ejemplo n.º 3
0
        void Awake()
        {
            appToken = TinySauce.getToken();


            if (appToken == "")
            {
                throw new MissingFieldException("Go here", new Exception("No Adjust token found please add it to your tinysauce settings"));
                Debug.Break();
                return;
            }
            if (IsEditor())
            {
                return;
            }

            DontDestroyOnLoad(transform.gameObject);

            if (!this.startManually)
            {
                AdjustConfig adjustConfig = new AdjustConfig(this.appToken, this.environment, (this.logLevel == AdjustLogLevel.Suppress));
                adjustConfig.setLogLevel(this.logLevel);
                adjustConfig.setSendInBackground(this.sendInBackground);
                adjustConfig.setEventBufferingEnabled(this.eventBuffering);
                adjustConfig.setLaunchDeferredDeeplink(this.launchDeferredDeeplink);
                Adjust.start(adjustConfig);
            }
        }
Ejemplo n.º 4
0
        void Awake()
        {
            if (Adjust.instance != null)
            {
                return;
            }

            DontDestroyOnLoad(transform.gameObject);

            if (!this.startManually)
            {
                AdjustConfig adjustConfig;

                adjustConfig = new AdjustConfig(this.appToken, this.environment, (this.logLevel == AdjustLogLevel.Suppress));

                adjustConfig.setLogLevel(this.logLevel);
                adjustConfig.setSendInBackground(this.sendInBackground);
                adjustConfig.setEventBufferingEnabled(this.eventBuffering);
                adjustConfig.setLaunchDeferredDeeplink(this.launchDeferredDeeplink);

                if (printAttribution)
                {
                    adjustConfig.setEventSuccessDelegate(EventSuccessCallback);
                    adjustConfig.setEventFailureDelegate(EventFailureCallback);
                    adjustConfig.setSessionSuccessDelegate(SessionSuccessCallback);
                    adjustConfig.setSessionFailureDelegate(SessionFailureCallback);
                    adjustConfig.setDeferredDeeplinkDelegate(DeferredDeeplinkCallback);
                    adjustConfig.setAttributionChangedDelegate(AttributionChangedCallback);
                }

                Adjust.start(adjustConfig);
            }
        }
Ejemplo n.º 5
0
        public void StartWithCurrentParameters()
        {
            AdjustConfig adjustConfig = new AdjustConfig(this.appToken, this.environment);

            adjustConfig.setLogLevel(this.logLevel);
            adjustConfig.setEventBufferingEnabled(eventBuffering);

            if (printAttribution)
            {
                adjustConfig.setAttributionChangedDelegate(responseDelegate);
            }

            Adjust.start(adjustConfig);
        }
Ejemplo n.º 6
0
 private void Awake()
 {
     if (!IsEditor())
     {
         UnityEngine.Object.DontDestroyOnLoad(base.transform.gameObject);
         if (!startManually)
         {
             AdjustConfig adjustConfig = new AdjustConfig(appToken, environment, logLevel == AdjustLogLevel.Suppress);
             adjustConfig.setLogLevel(logLevel);
             adjustConfig.setSendInBackground(sendInBackground);
             adjustConfig.setEventBufferingEnabled(eventBuffering);
             adjustConfig.setLaunchDeferredDeeplink(launchDeferredDeeplink);
             start(adjustConfig);
         }
     }
 }
Ejemplo n.º 7
0
 private void Awake()
 {
     if (Adjust.IsEditor())
     {
         return;
     }
     UnityEngine.Object.DontDestroyOnLoad(base.transform.gameObject);
     if (!this.startManually)
     {
         AdjustConfig adjustConfig = new AdjustConfig(this.appToken, this.environment, this.logLevel == AdjustLogLevel.Suppress);
         adjustConfig.setLogLevel(this.logLevel);
         adjustConfig.setSendInBackground(this.sendInBackground);
         adjustConfig.setEventBufferingEnabled(this.eventBuffering);
         adjustConfig.setLaunchDeferredDeeplink(this.launchDeferredDeeplink);
         Adjust.start(adjustConfig);
     }
 }
Ejemplo n.º 8
0
        void Awake()
        {
            if (!Application.isEditor)
            {
                DontDestroyOnLoad(transform.gameObject);

                if (!this.startManually)
                {
                    AdjustConfig adjustConfig = new AdjustConfig(this.appToken, this.environment, (this.logLevel == AdjustLogLevel.Suppress));
                    adjustConfig.setLogLevel(this.logLevel);
                    adjustConfig.setSendInBackground(this.sendInBackground);
                    adjustConfig.setEventBufferingEnabled(this.eventBuffering);
                    adjustConfig.setLaunchDeferredDeeplink(this.launchDeferredDeeplink);
                    Adjust.start(adjustConfig);
                }
            }
        }
Ejemplo n.º 9
0
        void Awake()
        {
            DontDestroyOnLoad(transform.gameObject);

            if (!this.startManually)
            {
                AdjustConfig adjustConfig = new AdjustConfig(this.appToken, this.environment);
                adjustConfig.setLogLevel(this.logLevel);
                adjustConfig.setEventBufferingEnabled(eventBuffering);

                if (printAttribution)
                {
                    adjustConfig.setAttributionChangedDelegate(responseDelegate);
                }

                Adjust.start(adjustConfig);
            }
        }
Ejemplo n.º 10
0
        void Awake()
        {
            DontDestroyOnLoad (transform.gameObject);

            if (!this.startManually) {
                AdjustConfig adjustConfig = new AdjustConfig (this.appToken, this.environment);
                adjustConfig.setLogLevel (this.logLevel);
                adjustConfig.setEventBufferingEnabled (eventBuffering);

                if (printAttribution) {
                    adjustConfig.setAttributionChangedDelegate (responseDelegate);
                }

                Adjust.start (adjustConfig);
            }
        }
Ejemplo n.º 11
0
    void OnGUI()
    {
        if (showPopUp) {
            GUI.Window(0, new Rect((Screen.width / 2) - 150, (Screen.height / 2) - 65, 300, 130), showGUI, "Is SDK enabled?");
        }

        if (GUI.Button (new Rect (0, Screen.height * 0 / nr_buttons, Screen.width, Screen.height / nr_buttons), txtManualLaunch)) {
            if (!string.Equals(txtManualLaunch, "SDK Launched", StringComparison.OrdinalIgnoreCase)) {
                AdjustConfig adjustConfig = new AdjustConfig ("{YourAppToken}", AdjustEnvironment.Sandbox);
                adjustConfig.setLogLevel (AdjustLogLevel.Verbose);
                adjustConfig.setAttributionChangedDelegate (this.attributionChangedDelegate);

                Adjust.start (adjustConfig);
                isEnabled = true;

                txtManualLaunch = "SDK Launched";
            }
        }

        if (GUI.Button (new Rect (0, Screen.height * 1 / nr_buttons, Screen.width, Screen.height / nr_buttons), "Track Simple Event")) {
            AdjustEvent adjustEvent = new AdjustEvent ("{YourEventToken}");

            Adjust.trackEvent (adjustEvent);
        }

        if (GUI.Button (new Rect (0, Screen.height * 2 / nr_buttons, Screen.width, Screen.height / nr_buttons), "Track Revenue Event")) {
            AdjustEvent adjustEvent = new AdjustEvent ("{YourEventToken}");
            adjustEvent.setRevenue (0.25, "EUR");

            Adjust.trackEvent (adjustEvent);
        }

        if (GUI.Button (new Rect (0, Screen.height * 3 / nr_buttons, Screen.width, Screen.height / nr_buttons), "Track Callback Event")) {
            AdjustEvent adjustEvent = new AdjustEvent ("{YourEventToken}");

            adjustEvent.addCallbackParameter ("key", "value");
            adjustEvent.addCallbackParameter ("foo", "bar");

            Adjust.trackEvent (adjustEvent);
        }

        if (GUI.Button (new Rect (0, Screen.height * 4 / nr_buttons, Screen.width, Screen.height / nr_buttons), "Track Partner Event")) {
            AdjustEvent adjustEvent = new AdjustEvent ("{YourEventToken}");

            adjustEvent.addPartnerParameter ("key", "value");
            adjustEvent.addPartnerParameter ("foo", "bar");

            Adjust.trackEvent (adjustEvent);
        }

        if (GUI.Button (new Rect (0, Screen.height * 5 / nr_buttons, Screen.width, Screen.height / nr_buttons), txtSetOfflineMode)) {
            if (string.Equals(txtSetOfflineMode, "Turn Offline Mode ON", StringComparison.OrdinalIgnoreCase)) {
                Adjust.setOfflineMode(true);

                txtSetOfflineMode = "Turn Offline Mode OFF";
            } else {
                Adjust.setOfflineMode(false);

                txtSetOfflineMode = "Turn Offline Mode ON";
            }
        }

        if (GUI.Button (new Rect (0, Screen.height * 6 / nr_buttons, Screen.width, Screen.height / nr_buttons), txtSetEnabled)) {
            if (string.Equals(txtSetEnabled, "Disable SDK", StringComparison.OrdinalIgnoreCase)) {
                Adjust.setEnabled(false);

                txtSetEnabled = "Enable SDK";
            } else {
                Adjust.setEnabled(true);

                txtSetEnabled = "Disable SDK";
            }
        }

        if (GUI.Button (new Rect (0, Screen.height * 7 / nr_buttons, Screen.width, Screen.height / nr_buttons), "Is SDK Enabled?")) {
            isEnabled = Adjust.isEnabled();

            showPopUp = true;
        }
    }