Storages

SGPatcher has an automatic file uploader on the server. Our system currently supports several options for connecting to the server: Google Drive FTP/SFTP Amazon S3

Google Drive

Setting up access to your Google Drive.


For resolve a conflict with google drive api, read below.

Your users do not need to log in via Google. This is only needed for SG Patcher Builder.

Flow steps:

image-1589012051312.png

image-1589013657719.png

image-1589013692031.png

image-1589013795094.png


Change user access to Google Drive.


If you need to switch the system to another Google account, go to your Unity project
directory (with ”Assets” folder) and delete ”sgpatcher_token” folder.


Disable Google Drive module


If you have a conflict with Google Drive api, you can disable google drive module and remove Google libs from SIDGIN/Plugins/Google.

To change mode go to SIDGIN/SIDGIN.Patcher/Plugins/Unity_2018_4 folder. Disable all libraries in this folder:

image-1604526129891.png

 

Next, go to  SIDGIN/SIDGIN.Patcher/Plugins/Unity_2018_4_Google_Disabled folder. Enable all libraries in this folder.

SIDGIN.Patcher.Unity configuration:

image-1604526206830.png

SIDGIN.Patcher.Unity.Editors configuration:

image-1604526239506.png

After that remove SIDGIN/Plugins/Google folder.

FTP/SFTP

Setting up access to FTP Server


Follow steps:

  1. Go to the ”Settings” tab.
  2. Make sure the ”Storage API” is set to ”Http”.
  3. Select the desired FTP / SFTP connection protocol. Ask your server administator
    which of these protocols you are using, if you do not know. Fill all fields related to the
    selected protocol.
  4. Fill in all the required fields for FTP / SFTP.
  5. Download base link (DBL) - base link, it is necessary for the client to work, your files
    will be downloaded by the client according to the following rule: DBL + ”Definition
    folder” (DF) + file name. For example, DBL = ”https://example.com/patches/” and
    DF = ”win”. Patcher Client will download the files for the current definition at the
    following link: ”https://example.com/patches/win/”. Keep in mind that this path
    should be accessible to all Internet users via a direct link.
  6. After all the fields have been filled out, click the ”Test” button. If you received
    the message ”Congratulations!” then the system is ready to go. If you get an error
    message check the console window there will be detailed information about the error.

FTP


image-1589014592969.png


SFTP


image-1589016093348.png


Example

I want to upload sgpatcher files to "patches" folder on the server. In my ftp manager I see "www/example.com/patches". Website "https://example.com/" follows to "www/example.com" folder. What should I write in the fields?

You should set "Home Directory" to "www/example.com/patches/". And set "Download base link" to "https://example.com/patches/".

Amazon S3

Before setup Amazon S3 in SGPatcher prepare bucket on aws console. Go to https://console.aws.amazon.com/iam/home.

Find S3 service.

18.gif

Click on "Create bucket" button and set "Bucket name" and "Region".

image-1594656203641.gif

Click next and next. Uncheck "Block all public access" and check "I acknowledge that....". Click on next and "Create bucket" button.