Exemplo n.º 1
0
    public static string getToken()
    {
        TinySauceSettings sauceSettings = TinySauceSettings.Load();

#if UNITY_ANDROID
        return(sauceSettings.adjustAndroidToken.Replace(" ", string.Empty));
#endif
#if UNITY_IOS
        return(sauceSettings.adjustIOSToken.Replace(" ", string.Empty));
#endif
        return("");
    }
Exemplo n.º 2
0
        public static void RequestAdvertisingId(RequestAdvertisingIdCallback callBack,
                                                bool forceZerosForLimitedAdTrackingIos,
                                                bool forceZerosForLimitedAdTrackingAndroid)
        {
#if UNITY_EDITOR
            var editorIdfa = TinySauceSettings.Load().EditorIdfa;
            var finalIdfa  = string.IsNullOrEmpty(editorIdfa) ? LimitedAdTrackingId : editorIdfa;
            callBack(finalIdfa, true, null);
#elif UNITY_ANDROID
            Application.RequestAdvertisingIdentifierAsync((advertisingId, adTrackingEnabled, error) => {
                var finalIdfa = (forceZerosForLimitedAdTrackingAndroid && !adTrackingEnabled) ? LimitedAdTrackingId : advertisingId;
                callBack(finalIdfa, adTrackingEnabled, error);
            });
#elif UNITY_IOS
            bool adTrackingEnabled = NativeWrapper.GetAuthorizationStatus() == IdfaAuthorizationStatus.Authorized;
            var  finalIdfa         = (forceZerosForLimitedAdTrackingIos && !adTrackingEnabled) ? LimitedAdTrackingId : UnityEngine.iOS.Device.advertisingIdentifier;
            callBack(finalIdfa, adTrackingEnabled, "");
#endif
        }
Exemplo n.º 3
0
        private static TinySauceSettings CreateTinySauceSettings()
        {
            TinySauceSettings settings = TinySauceSettings.Load();

            if (settings == null)
            {
                settings = CreateInstance <TinySauceSettings>();
                //create tinySauce folders if it not exists
                if (!AssetDatabase.IsValidFolder("Assets/Resources"))
                {
                    AssetDatabase.CreateFolder("Assets", "Resources");
                }

                if (!AssetDatabase.IsValidFolder("Assets/Resources/TinySauceSettings"))
                {
                    AssetDatabase.CreateFolder("Assets/Resources", "TinySauce");
                }
                //create TinySauceSettings file
                AssetDatabase.CreateAsset(settings, "Assets/Resources/TinySauce/Settings.asset");
                settings = TinySauceSettings.Load();
            }

            return(settings);
        }
 public void OnPreprocessBuild(BuildReport report)
 {
     CheckAndUpdateGameAnalyticsSettings(TinySauceSettings.Load());
 }
Exemplo n.º 5
0
 public void OnPreprocessBuild(BuildReport report)
 {
     CheckAndUpdateAdjustSettings(TinySauceSettings.Load());
 }