Search Unity

[Solved] Stop auto update check for UnityIAP

Discussion in 'Unity IAP' started by playcooprogrammer, Sep 19, 2017.

Thread Status:
Not open for further replies.
  1. playcooprogrammer

    playcooprogrammer

    Joined:
    Jul 28, 2016
    Posts:
    2
    I've used Unity IAP for a few months.
    It's update frequency, but I want to keep current version of Unity IAP without update.
    So I don't want it notify me UPDATE while I open my Unity3D.
    How can I close this message?
     
  2. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    @playcooprogrammer,

    Yeah, the Updater can be a bit annoying sometimes. We are working on some improvements, which includes a way to ignore the updates.

    The way it currently works, we store a value in PlayerPrefs of when to notify you. If you are using PlayerPrefs.DeleteAll, then that might be erasing that setting and causing the updater to run more often than normal.
     
    nicholasr and playcooprogrammer like this.
  3. playcooprogrammer

    playcooprogrammer

    Joined:
    Jul 28, 2016
    Posts:
    2
    @ap-unity,

    Thanks for your reply.

    According to your message,
    I've found UnityIAP stroed PlayerPrefs in my computer's register(os windows).

    So I write a script to delay the check time of UnityIAP,
    for prevent display UPDATE message.

    It's seems work nicely on my computer, thanks again.
    Hopefully have an official ways in later days.

    Code (CSharp):
    1.  
    2. using UnityEditor;
    3. using UnityEngine;
    4.  
    5. [InitializeOnLoad]
    6. public class UnityIAPNotifyDelayer
    7. {
    8.     static UnityIAPNotifyDelayer()
    9.     {
    10.         string setTime = "1/1/2020 0:0:0 AM";
    11.         string curtime = PlayerPrefs.GetString("PackageUpdaterLastChecked68207");
    12.         if (curtime != setTime)
    13.         {
    14.             PlayerPrefs.SetString("PackageUpdaterLastChecked68207", setTime);
    15.             Debug.Log("Unity IAP Check Time is Changed [ " + curtime + " >> " + setTime + " ]");
    16.         }
    17.         //else
    18.         //Debug.Log("Unity IAP Check Time is [ " + setTime + " ]");
    19.     }
    20. }
    21.  
     
    Josewdf, shijian and nicholasr like this.
Thread Status:
Not open for further replies.