Skip to content
This repository has been archived by the owner on Jul 1, 2020. It is now read-only.

Self Patching App Tutorial

Süleyman Yasir KULA edited this page May 15, 2020 · 1 revision

The SelfPatchingAppDemo example scene allows you to quickly create and test a self patching app.

  • open SelfPatchingAppDemo scene
  • follow these steps and paste VersionInfo's url to the Version Info URL variable of SelfPatchingAppUI in the Inspector
  • tweak the value of Check Version Only as you like
  • create a SimplePatchTool-project for this app
  • as this app uses self patching, we need a self patcher: create a self patcher and put it inside the SelfPatcher directory of the SimplePatchTool-project
  • enter the name of the self patcher's executable to the Self Patcher Executable variable of SelfPatchingAppUI in the Inspector
  • create a subdirectory called 1.0 inside the Versions folder of the SimplePatchTool-project
  • insert SelfPatchingAppDemo scene to the top of Scenes In Build list in Build Settings and then build the project. Afterwards, move the generated files into the 1.0 subdirectory
  • follow these steps to create a patch (you can skip the Prerequisites)
  • you've created your first patch, great! Now, we should create a second patch to test the patcher. First, make some changes to the scene (e.g. add some cubes around, change the background of the camera)
  • build the project again and move its files to another subdirectory called 1.1 inside the Versions folder of the SimplePatchTool-project
  • create another patch
  • if you launch the version 1.0 of the app now, you'll see that it'll detect the 1.1 update and prompt you to update itself to that version, well done!
  • also, if you had previously set Check Version Only to false, try deleting a redundant file from the app's Data directory (e.g. something from the Mono/etc subdirectory). When you launch the app, it will automatically detect the absence of the file and prompt you to update/repair itself