Steamworks 문서
Steam 클라우드
In Brief
Steam Cloud automatically stores files from your game on Steam's servers so your players can log into Steam and access their saved games from any computer.
Level of integration
Configuration of file paths required on Steamworks website. Optionally, some API calls required from within game code to Steamworks for upload, download, enumerate, and delete.

Steam 클라우드 개요

The Steam Cloud provides an easy and transparent remote file storage system for your game. Files specified in the Auto-Cloud configuration or written to disk (created, modified, deleted, etc.) using the Cloud API will automatically be replicated to the Steam servers after the game exits.

If the user changes computers, the files are automatically downloaded to the new computer prior to the game launching. The game can then access the files by reading them through the Cloud API or reading them directly from disk as usual. Avoid machine specific configurations such as video settings.

The Steam Client does the work of ensuring that the files are kept synchronized across all computers the user may be accessing.

Users can globally disable Cloud synchronization in the Steam Settings under Cloud by unchecking "Enable Steam Cloud synchronization for applications which support it."

Users can also disable the Cloud synchronization on a per game basis in each games properties.

Spacewar_Cloud_Properties.png

Notes and Best Practices


It is important to remember that Steam will synchronize the user's Steam Cloud files for your game before and after every session. Any matching files which change during the session will be uploaded to Cloud storage immediately afterward. If your game writes very large files, or many small files, to Steam Cloud, then this may cause a noticeable impact on the user's internet bandwidth and also delay their ability to shut down Steam or re-launch the game.

As a general rule, smaller files will work better. If the saved state for a given user can be split up into different categories - things which may change frequently, and things which may not change often - then we recommend using separate files for those categories. That way, the un-changed state will not be re-uploaded after every session.

File Size Limits


The absolute limits on file sizes for Steam Cloud may change over time. Here are some current limits and thresholds:

SizeRestriction
100MBMaximum size for a call to ISteamRemoteStorage::FileWrite or ISteamRemoteStorage:;FileWriteStreamWriteChunk
256MBMay result in a non-optimal storage endpoint choice for the user's location, negatively impacting upload/download performance

Initial Setup

To set up Steam Cloud you must set the Byte quota per user and Number of files allowed per user options on the Steam Cloud Settings page in the Steamworks App Admin panel.

This quota is enforced on each Cloud-enabled game, on a per-user-per-game basis. It's recommended to set the values to reasonable amounts for your game title.

참고: Don't forget to click Save at the bottom of the page, and Publish your updated settings. Once published the cloud icon will be visible in the Steam client for anyone that owns your game.

If your game has already been released to the public then you can check the box labeled Enable cloud support for developers only. If developers-only mode is enabled then only the steam accounts which own a "Developer Comp" license for your title will see the cloud icon and will be able to use the Steam Cloud. This is useful to safely test Steam Cloud integration without breaking the public user experience. This has no effect on unreleased games since no one owns the game yet, they won't be able to see or access any cloud storage for the specific app ID.

You are able to share Cloud storage space between two app IDs by filling out the Shared cloud APP ID field. This is most commonly used to share saved games between a demo and a full game. A value of 0 disables this feature.

Steam Cloud API and Steam Auto-Cloud

Steam provides two different methods of utilizing the Steam Cloud, read up on how the two methods differ, and determine which would be the best for your application.

First up is the Steam Cloud API.
The Cloud API provides a series of functions which allows you to directly integrate the Steam Cloud into your game. The Cloud API isolates individual Steam users files from each other and provides a greater level of control over the Steam Cloud.

The Steam Cloud API is exposed via the ISteamRemoteStorage API interface, and you can find example usage in the Steamworks API Example Application (SpaceWar) project.

The second is Steam Auto-Cloud.
Steam Auto-Cloud was designed for legacy games where you can not easily integrate the Steam Cloud API. It provides a quick and easy way to get started but lacks the power and flexibility that is available with the Steam Cloud API.

It is generally recommended that you use the Cloud API if possible as it allows for deeper integration and customization, and it enables you to best provide the high quality experience that Steam users have come to expect from the Steam Cloud.

Steam Auto-Cloud

Steam Auto-Cloud is an alternative to the Steam Cloud API that allows apps to use Steam Cloud without writing code or modifying the game in any way. It only requires that you specify the file groups which you want persisted to the Cloud. Steam will automatically sync the groups of files when the application launches and exits. Avoid machine specific configurations such as video quality.

Setup

After completing the Initial Setup the Steam Auto-Cloud configuration section will unlock on the Steam Cloud Settings page.

Root Paths describe groups of files which will be persisted to the Steam Cloud. Each Root Path can be as specific as a single file or as wide as all files under a given subfolder. Use a new path for each group of files to sync.

A Root Path is composed of 5 parts:
  1. 루트

    게임 내용이 저장되는 위치를 나타내는 경로 목록으로, 미리 정해져 있습니다.
    루트지원되는 OS대응 경로
    앱 설치 디렉터리모두[Steam Install]\SteamApps\common\[Game Folder]\
    SteamCloudDocuments모두플랫폼별로 다른 경로. Linux의 경우: ~/.SteamCloud/[username]/[Game Folder]/
    WinMyDocumentsWindows%USERPROFILE%\My Documents\
    WinAppDataLocalWindows%USERPROFILE%\AppData\Local\
    WinAppDataLocalLowWindows%USERPROFILE%\AppData\LocalLow\
    WinAppDataRoamingWindows%USERPROFILE%\AppData\Roaming\
    WinSavedGamesWindows%USERPROFILE%\Saved Games\
    MacHomemacOS~/
    MacAppSupportmacOS~/Library/Application Support/
    MacDocumentsmacOS~/Documents/
    LinuxHomeLinux~/
    LinuxXdgDataHomeLinux$XDG\_DATA\_HOME/
  2. 하위 디렉터리

    루트와 관련하여 클라우드화된 파일의 하위 디렉터리 경로. 하위 디렉터리가 없으면 `.`을 사용하세요.

    자동 클라우드 특수 경로 값
    자동 클라우드는 Subdirectory 경로에서 Steam 사용자의 고유 식별자 사용을 허용합니다. 이를 통해 각 사용자의 저장 파일을 컴퓨터에 개별적으로 보관할 수 있습니다. 게임에서 ISteamUser::GetSteamID를 사용하면 저장하거나 읽기 위해 현재 사용자의 SteamID 또는 AccountID를 가져올 수 있습니다.
    • {64BitSteamID} - Steam 경로에 이 변수를 사용해 사용자의 64비트 Steam ID를 삽입하세요. 64비트 Steam ID의 예: 76561198027391269
    • {Steam3AccountID} - Steam 경로에 이 변수를 사용해 사용자의 Steam 3 계정 ID를 삽입하세요. 계정 ID의 예: 67125541
    예: SavesDir/{64BitSteamID}
  3. 패턴

    일치를 위한 파일 마스크 패턴. * 기호를 와일드카드로 사용할 수 있습니다. 디렉터리에 있는 모든 파일을 원하는 경우, * 기호를 사용하면 됩니다.

    예: *.sav
  4. OS

    파일과 동기화할 OS를 설정합니다. 이 작업은 파일의 OS가 서로 다른 경우에만 필요하며, 이러한 작업이 필요 없는 편이 더 좋습니다.
  5. 반복

    일치하는 파일을 검색할 때 하위 디렉터리를 포함합니다. 이 방법은 하위 디렉터리의 이름이 Steam 사용자 이름이나 Steam ID가 아닌 불명확한 이름일 경우에 유용합니다. 하위 디렉터리가 Steam ID를 사용할 경우에는 하위 디렉터리 필드에 특수 경로를 사용할 것을 강력 추천합니다.

Root Overrides

If your application is cross-platform and requires different directories for each OS. You can use the Root Overrides functionality to specify an override the Root Paths that you set above.

The root paths specified above can be overridden to correspond to a different path on another OS. If you use Root Overrides, you must specify [All OSes] in the Root OS drop down above.

A Root Override consists of 5 parts.
  1. 기본 루트

    기본 루트는 위에서 설정한 루트 중 하나에 해당합니다.
  2. OS

    재정의를 적용할 OS입니다.
  3. 새 루트

    지정된 OS에서 기본 루트가 매핑하는 새로운 위치입니다.
  4. 경로 추가 및 교체

    새 루트와 기본 하위 디렉터리 사이에 하위 디렉터리를 추가할 수 있게 해줍니다.
  5. 경로 교체

    활성화할 경우, ‘원래 하위 디렉터리를 경로 추가 및 교체’에서 지정한 경로로 완전히 교체합니다.

Example: Configuring Auto-Cloud for Unity Applications

The following is an example of setting up Auto-Cloud for use with Unity and the Application.persistentDataPath property where the value is different per OS. The Windows version is configured as the Root Path with the company in Unity set to DefaultCompany and the Project called AutocloudSample. On macOS and Linux/SteamOS, the alternate paths from Application.persistentDataPath are set in the Add/Replace Path field and Replace Path is enabled.

With these settings, Auto-Cloud files will be synchronized between the three folders as shown in the Preview samples.

Cloud_Unity_Auto-Cloud_Example.png

Pre-release Testing

If you are adding Steam Auto-Cloud to a game which is already released and you have enabled developer-only mode during the Initial Setup then you must complete some additional steps to test the functionality.
  1. 테스트하려는 앱의 Developer Comp 라이선스를 가진 계정으로 Steam에 로그인하세요.
  2. 브라우저에서 steam://open/console로 이동하여 Steam 콘솔을 여세요.
  3. 콘솔에 테스트하고자 하는 앱 ID를 testappcloudpaths <AppId>의 형식으로 입력하세요. 예: testappcloudpaths 480
  4. 콘솔에 set_spew_level 4 4를 입력하세요.
  5. Steam에서 앱을 실행하세요.
  6. 콘솔 활동을 확인하세요. 파일이 자동 클라우드 경로에 이미 존재하는 경우 해당 파일이 업로드되는 것을 확인할 수 있습니다. 그렇지 않은 경우, 앱에서 파일 몇 개를 저장한 후 콘솔을 닫아 동기화가 시작되도록 하세요.
  7. 다른 컴퓨터로 위 단계를 반복하여 Steam 자동 클라우드에서 파일을 다운로드하는 테스트를 진행하세요.
  8. 지원되는 모든 시스템에서 테스트해 보세요.
  9. 종료하려면 testcloudapppaths 0set_spew_level 0 0을 설정하세요. 콘솔 탭을 없애려면 Steam 클라이언트를 다시 시작하세요.

Don't forget to disable developers-only mode and publish the changes when you're done testing.

Debugging

First, always ensure that you have published your changes on the Steam partner website and have waited up to 10 minutes or restarted your Steam client to receive the published changes.

If you run into issues with Steam Cloud you should check the log file located at %Steam Install%\logs\cloud_log.txt.

See Steamworks API 디버깅 for additional information.