Home › Page › External Persistent Archive

External Persistent Archive

External Persistent Archive

Graveck UDev External Persistent Archive

External Persistent Archive (or EPA) is a class to help automate the process of keeping
local data synced with an external source. This process is particularly useful if you
want to be able to change settings or data in a game after it has already been released,
but without having to publish an update. Examples of past uses include changing the
price of in-game items, launching promotional giveaways, and tweaking the frequency
of loot drops.

EPA achieves this by:
* Attempting to download a new version of the file from the designated external location.
* If the download is successful, EPA will save a local copy. (This copy is encrypted for security.)
* If the download fails, EPA will attempt to load the last saved local copy.

To Use:
* Place the ExternalPersistentArchive monobehavior on a game object in the scene.
* For added security, change the ExternalPersistentArchive.rijKey member to a unique value for your project.
* In the inspector:
* Set archiveName to be the name of the local file copy.
* Set externalLocationType to the type of location of the external file. (Most likely Web.)
* Set externalURI to the path of the external file. Make sure to fully qualify this path (i.e. use “http://”)
* At runtime you can register for the event OnExternalAchiveRead, or you can call the Reload method and wait for the Data accessor to be non-null.

We have included the class ExternalModificationManager as an example of how to use EPA.
This class demonstrates how to use EPA in conjuction with an external JSON file to
modify values at run-time. To make user of ExternalModificationManager in your own projects,
place the class on the same object as your EPA and then change the code in the ProcText
function to fit your needs. (Note that you may want to call DontDestroyOnLoad on this
object to ensure that it persists between scenes–depending on your specific needs.)

Go here for Support and Feedback