How to update Unity application over the internet

Hi,

I have a Unity application that I will be deploying to users around the world. It is not a game but a software product that takes uses the Unity game engine.

I want to be able to provide regular automatic updates over the internet to all of the users of the software. Is there a recommended library/framework for doing this?

I’ve looked at many options such as WinSparkle, Autoupdater.net, NetSparkle but I am not sure as to whether these are compatible with a Unity application?

Thanks

This is one of those things which have had many possible recommendable solutions that have since disappeared from their repositories. Lots of previously regarded tools no longer exist, or work only on older versions. There have been (maybe still are) some assets in the Unity store. There was (might still be) support for this in Unity Pro. My reading so far is that this isn’t something well settled, even though at times it seemed that it was.


Even though Unity uses C#, the underlying application is not a .NET build, it is a native application. As such, it may not work to use a .NET based update product.


Despite the fact we all know that it should be possible to update using patches, to reduce download size, the act of doing that is a management nightmare long term. If a user skips several patches, each skipped patch must be applied in order so the state of the software is correct for the next patch. I’ve read many laments, both about Unity and a lot of products, which make it clear that updates are usually long downloads, often full re-installs, and it is easy to understand why. A company like Microsoft, with considerable resources with which to manage the update rollout, can afford to spend the time required to organized efficient update patches over long the term. You no doubt realize the monstrous complication of their products like Visual Studio and Office products, let alone the operating system. For something like Visual Studio it makes sense to spend time making the update efficient. When you consider the relative simplicity of many applications, like Mozilla Firefox or a Unity game, it makes less sense to patch, favoring a replacement install.


A Unity game is so straight forward on Windows that you CAN just copy a directory to a computer and double click the executable. An installation of something like Visual Studio or Microsoft Office is not released to be so easily dropped in like that, though it could be. There is an advantage to having an application build so unencumbered as to simply run if a directory merely contains the executable and a directory structure of the assets it may read to launch.


To me, this last point suggests that the notion of distributing an update for a Unity product in Windows is potentially so simple that it merely means downloading the updated materials and placing them in the appropriate directory. For that I’d be highly motivated to simply build a stand alone update tool, perhaps leveraging a C# build that can download from an FTP server, and unpack a zip while ensuring the target of the update is not running.


Further, the update is one thing - but what if the user wants to roll that back? Most update features I see don’t do that. You’d have to have a backup, or access to a restore point. With a Unity Windows application it is possible to zip up a backup of the existing version, and thus offer a rollback that is both trivial and reliable. Another point along these lines is to wonder if the user might want to place an update as a side-by-side installation of versions, so as to test the update before committing to it. This, too, could be made more trivial with a bit of organization and planning, by creating your own stand alone method for doing this.


I’m sure there are some favorites out there some will swear by. I wouldn’t argue, but in my view it is simple enough to write my own.