Difference between revisions of "Xbox 360 Storage"

From Alpha Archive Wiki
Jump to navigation Jump to search
 
Line 11: Line 11:
 
==Create Save Game==
 
==Create Save Game==
 
<small>public static bool CreateSaveGame(uint userIndex, string displayName, string fileName, string mountName, X360Storage.DelegateResult onComplete);</small>
 
<small>public static bool CreateSaveGame(uint userIndex, string displayName, string fileName, string mountName, X360Storage.DelegateResult onComplete);</small>
 +
 +
 
displayName is the save file name shown on the dashboard. fileName is the save file name on disc. This name must be unique on every physical media. mountName is the name of the virtual drive the save file is mounted to. i.e. specifying "name" will create a drive accessible via "name:\". Call Unmount with the same mount name once saving/loading is finished. Returns false if a storage operation is already active by checking IsStorageOpActive or if the selected user is not signed-in and Ready. onComplete is never called if this function returns false.
 
displayName is the save file name shown on the dashboard. fileName is the save file name on disc. This name must be unique on every physical media. mountName is the name of the virtual drive the save file is mounted to. i.e. specifying "name" will create a drive accessible via "name:\". Call Unmount with the same mount name once saving/loading is finished. Returns false if a storage operation is already active by checking IsStorageOpActive or if the selected user is not signed-in and Ready. onComplete is never called if this function returns false.

Latest revision as of 17:20, 11 August 2020

  • Storage (saving and loading) works by mounting files on physical media (HDD and memory card) as virtual drives. Calling X360Storage.CreateSaveGame or X360SaveGame.Open will mount the saved file as a drive at "mountName:" i.e. on success X360SaveGame.Open("save", onComplete) you will be able to access files inside the save via "save:\" Mounts should be unmounted using X360Storage.Unmount once they are not required anymore.

Game load/save checklist

  1. Set up a valid project title id
  2. Sign-in a user using X360Core.RequestSignIn
  3. Have that user select a storage device using X360Storage.SelectSaveGameStorageDeviceForUser
  4. Create and open a save game file using X360Storage.CreateSaveGame
  5. Write to the save game file using either X360Storage.WriteBuffer or X360Storage.WritePlayerPrefs
  6. Close the save game file using X360Storage.Unmount

Create Save Game

public static bool CreateSaveGame(uint userIndex, string displayName, string fileName, string mountName, X360Storage.DelegateResult onComplete);


displayName is the save file name shown on the dashboard. fileName is the save file name on disc. This name must be unique on every physical media. mountName is the name of the virtual drive the save file is mounted to. i.e. specifying "name" will create a drive accessible via "name:\". Call Unmount with the same mount name once saving/loading is finished. Returns false if a storage operation is already active by checking IsStorageOpActive or if the selected user is not signed-in and Ready. onComplete is never called if this function returns false.