RBDownloadable

Mar 4, 2018
RBDownloadable
  • Description:

    From 1.7.1 you have the ability to add downloads from the server, and the client will automatically download them in the RB_Data folder where you specified.

    Usage:
    Code (C#):
    API.AddFileToDownload(new RBDownloadable("TestPlugin\\SubFolder", Util.GetRootFolder() + "\\Save\\MyServerPlugin\\Hello.unity3d"));
    This will send the client an SHA1 hash, and will check If It already has the file or not. If all of them is true the file will not be downloaded since It's the same.

    You can also bypass hash checking by specifying:
    Code (C#):
    API.AddFileToDownload(new RBDownloadable("TestPlugin\\SubFolder", Util.GetRootFolder() + "\\Save\\MyServerPlugin\\Hello.unity3d", true));
    This is good for configuration files such as inis. If the user changes the ini file, the file won't be overwritten. If the file doesn't exist It will be downloaded.