コード例 #1
0
    void ParseUrl(string url)
    {
        Debug.Log("### UnityDeeplinks " + url);
        var uri = new Uri(url);

        string query = uri.Query;

        if (query.Length == 0)
        {
            return;
        }
        query = query.Substring(1);
        foreach (var param in query.Split('&'))
        {
            var tmp = param.Split('=');
            if (tmp[0] == "optout")
            {
                if (tmp[1] == "1")
                {
                    Debug.Log("### UnityDeeplinks Opt Out Processing : true");
                    TTOptOut.SetNeedOptOut(true);
                    break;
                }
                else
                {
                    Debug.Log("### UnityDeeplinks Opt Out Processing : false");
                }
            }
        }
    }
コード例 #2
0
 void InitializeFacebook()
 {
     if (FB.IsInitialized)
     {
         TTOptOut.FacebookOptInOrOut(); // <= これが重要
         FB.ActivateApp();
     }
     else
     {
         FB.Init(() =>
         {
             TTOptOut.FacebookOptInOrOut(); // <= これが重要
             FB.ActivateApp();
         });
     }
 }
コード例 #3
0
 private void Awake()
 {
     _mConsentDialog            = this.GetComponentInChildren <TTConsentDialog>();
     _mConsentDialog.OnConsent += (sender, args) =>
     {
         TTConsentPlayerPref.DidShowConsent();
         TTOptOut.SetNeedOptOut(!args.IsConsent);
         NextScene();
     };
     _mErrorDialog          = this.GetComponentInChildren <TTConsentErrorDialog>();
     _mErrorDialog.OnRetry += (sender, args) =>
     {
         _mErrorDialog.Hide();
         Request();
     };
 }
コード例 #4
0
        static void DoOptInOrOut()
        {
            Debug.Log("### TTConsent RuntimeInitializeOnLoadMethod()");
            // まだ同意を得てない場合は何もしない
            if (!TTConsentPlayerPref.AlreadyShowConsent())
            {
                Debug.Log("### TTConsent 同意前なので処理なし");
                if (TTOptOut.NeedOptOut())
                {
                    Debug.Log("ただし、設定画面からオプトアウトしてる可能性もあるので、オプトアウト状態だったらオプトアウトだけさせる");
                    TTOptOut.DoOptOut();
                }

                return;
            }

            Debug.Log("### TTConsent 起動時 DoOptInOrOut");
            TTOptOut.DoOptInOrOut();
        }