SGPatcherLoader


Events


SGPatcherProgressEvent<PatcherProgress> onProgressChanged.

Unity Event for callback process.

public struct DownloadProgress
    {
        public float progress;
        public string status;
        public string speed;
        public string downloadedSize;
        public string targetSize;
    }
    public class PatcherProgress
    {
        public float progress;
        public string status;
        public DownloadProgress downloadProgress;
    }
SGPatcherErrorEvent<ErrorMessage> onError.

Unity Event for handling errors.

public class ErrorMessage
    {
        public string message;
        public System.Exception exception;
    }
SGPatcherErrorEvent<ErrorMessage> onInternalError.

Unity Event for handling Internal errors.


async void UpdateGame()


Runs an integrity check and updates the game as needed.

For run use async await (Tasks);


void LoadGame()


If the game was installed, it loads level 0 without checking for updates.


async Task<UpdateMetaData> GetUpdateMetaData()


Returns preliminary update meta data.

 public enum UpdateStatus
    {
        No_Required,
        Required,
        Main_Build_Update_Required
    }
    public class UpdateMetaData
    {
        public UpdateStatus updateStatus;
        public long updateSize;
        public int updateCount;
        public string notes;
    }

 


async Task InstallPackage(packageName)


Installing package by name.


Revision #3
Created Sun, Oct 11, 2020 8:32 PM by Admin
Updated Mon, Oct 12, 2020 12:28 PM by Admin