In-App Updates for Google Play

Google Play in-app updates for Unity. A drop-in prefab with a Flexible / Immediate update policy, a simple C# API, and an Editor simulator that plays every flow without a store upload.

  • Flexible and Immediate
  • Update policy
  • Editor simulator
  • EDM resolved
  • Unity 2022.3+ · Android
In-App Updates for Google Play

Update players without leaving the game.

In-App Updates wraps Google’s official Play In-App Updates library in a component you drop into your first scene. On launch it asks Google Play for a newer version, picks a Flexible update (a background download while the player keeps playing) or an Immediate one (full screen, for the releases that can’t wait) with a simple policy, and raises UnityEvents for your UI. Prefer code? A small static API gives you the same flows with C# events.

A simulator plays Google Play’s side in the Editor: test the update dialog, the download progress, declines, failed downloads and resuming after a restart in Play Mode, without uploading a single build.

Drop in, done

One prefab checks on launch and on resume, and starts the right Play flow.

A smart policy

Urgent releases go Immediate by priority or staleness; everything else stays Flexible.

Test in the Editor

A simulator answers like Google Play: dialogs, progress, declines, failures, resume.

Or script it

A small static API with C# events, on the main thread, safe on every platform.

Description

UPDATES

  • Flexible updates: download in the background, then ask the player to restart (or install automatically)
  • Immediate updates: Google Play’s full-screen flow that blocks until the update is installed
  • Checks on start and when the app returns to the foreground
  • Resumes an update interrupted by an app restart, as Google requires
  • Finds Flexible downloads that finished while the game was in the background

UPDATE POLICY

  • Urgent releases go Immediate by priority (default: 4 and up) or by how many days Google Play has known about them
  • Everything else stays Flexible; the policy never turns a non-urgent update into a blocking one
  • Falls back to the other mode when Google Play doesn’t allow one
  • Doesn’t nag: after a Flexible decline it waits a few days (default 3) before offering it again

EDITOR SIMULATOR

  • Every call goes to a simulator in the Editor: no Play Store upload, no device
  • A stand-in Play dialog in the Game view, or a simulated player who always accepts or declines
  • Simulate priority, staleness, allowed modes, failed checks and downloads, network delay and download size
  • Live state and test buttons in the Inspector while playing
  • Optional: run the simulator in Development builds on a device to test your UI

SETUP

  • Google’s Play library is declared for the External Dependency Manager (Unity’s EDM or Google’s EDM4U): no Google Unity packages to install, no clashes with other Play plugins
  • One click in the Inspector adds the External Dependency Manager if the project has none
  • iOS and other platforms: every call is a safe no-op, so the same code ships everywhere

DEMO

  • One scene: status, download progress, a restart prompt and a live event log, in portrait and landscape

FOR PROGRAMMERS

  • Static InAppUpdate API with CheckCompleted, StateChanged, Declined and Failed events, all on the main thread
  • Full C# source in assembly definitions, with automated tests of the policy and the simulator flows

REQUIREMENTS

  • Unity 2022.3 or newer, with Android Build Support for device builds
  • The External Dependency Manager (com.unity.external-dependency-manager, or Google’s EDM4U) to resolve Google’s Play library
  • Real updates appear only for an app installed from Google Play

THIRD-PARTY

Includes the Nunito font (SIL Open Font License 1.1) and Material Symbols icons (Apache License 2.0) in the demo. See the documentation.

If you have any questions, requests or something isn’t working, please send me an email at: support@hardartcore.com

Release notes

  • v2.0
    • Rewritten on Google’s Play In-App Updates library (app-update 2.1.0), resolved by the External Dependency Manager.
    • InAppUpdater component with an update policy: Immediate by priority or staleness, Flexible otherwise.
    • Static InAppUpdate API with C# events on the main thread; a safe no-op on other platforms.
    • Editor simulator with a stand-in Play dialog, live Inspector state and test buttons.
    • Resumes interrupted updates and finds downloads that finished in the background.
    • New demo scene, assembly definitions and automated tests.
  • v1.x
    • AndroidUpdateManager and AutoUpdater on the Play Core library.

Screenshots

Need help?

Questions or ideas about In-App Updates for Google Play? Send me an email.

Get support