Steam 클라우드는 게임 데이터를 유저의 로컬이 아닌 Steam 서버에 저장하여,
여러 디바이스 간의 데이터 동기화를 지원하는 기능.
Steam Cloud 문서 를 많이 읽어보자.

Dynamic Cloud 설정
Auto-Cloud 설정
마찬가지로 Steam 클라이언트가 연결된 상태여야 한다.
세부적인 동기화 제어를 위해 FacePunch 의 SteamRemoteStorage API 를 활용하였다.
JSON 형태로 데이터를 저장하고 불러오기 위해
SaveData 를 [System.Serialzable] 속성으로 생성해주었다.
[System.Serializable]
public class SaveData
{
public DeathPos deathPos = new DeathPos(); // 마지막 죽은 위치 (stage - pos)
public string keyBindingsJson = null; // 키 설정
public int unlockedDifficulty = 1; // 해금 난이도
}
스팀 클라이언트와 연결되었는지 확인하고,
연결되었다면, 저장된 데이터를 불러오기.
private void Start()
{
if (!SteamClient.IsValid)
{
Debug.LogError("Steam Client가 실행되지 않았습니다.");
return;
}
Load(); // 게임 실행 시 자동 불러오기
}
정상적으로 클라우드가 작동하지 않거나, 데이터가 잘 불러와지지 않는다면,
다음 프로퍼티와 메서드를 활용해서 디버그해보자.
static System.DateTime FileTime( string filename )
static int FileCount { get; }
static IEnumerable Files { get; }
static bool IsCloudEnabled { get; }
IsCloudEnabledForAccount 및 IsCloudEnabledForApp 인 경우 true를 반환static bool IsCloudEnabledForAccount { get; }
static bool IsCloudEnabledForApp { get; set; }
static ulong QuotaBytes { get; }
static ulong QuotaRemainingBytes { get; }
static ulong QuotaUsedBytes { get; }
[2025-03-18 15:17:00] [AppID 3508090] Starting sync (init,)
[2025-03-18 15:17:00] [AppID 3508090] AutoCloud checking local state for user 406302897
[2025-03-18 15:17:00] [U:1:406302897] [AppID 3508090] Init cache request complete
[2025-03-18 15:17:00] [AppID 3508090] Starting sync (eval,)
[2025-03-18 15:17:00] [AppID 3508090] AutoCloud checking local state for user 406302897
[2025-03-18 15:17:00] [AppID 3508090] YldWriteCacheDirectoryToFile - empty vector, deleting 'C:\Program Files (x86)\Steam/userdata/406302897/3508090/remotecache.vdf'
[2025-03-18 15:17:01] [AppID 3508090] Need to sync from local change number '0' to global change number '0' (full), but not attempting now
[2025-03-18 15:17:01] [AppID 3508090] Eval complete