[Solved] Stop auto update check for UnityIAP

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?

@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.

2 Likes

@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.

using UnityEditor;
using UnityEngine;

[InitializeOnLoad]
public class UnityIAPNotifyDelayer
{
    static UnityIAPNotifyDelayer()
    {
        string setTime = "1/1/2020 0:0:0 AM";
        string curtime = PlayerPrefs.GetString("PackageUpdaterLastChecked68207");
        if (curtime != setTime)
        {
            PlayerPrefs.SetString("PackageUpdaterLastChecked68207", setTime);
            Debug.Log("Unity IAP Check Time is Changed [ " + curtime + " >> " + setTime + " ]");
        }
        //else
        //Debug.Log("Unity IAP Check Time is [ " + setTime + " ]");
    }
}
3 Likes