Skip to content

PlayStation 4

Platform-specific layer for PS4. Provides save-data I/O through IFileSystem and a Trophies API on top of the Sony PS4 SDK.

Setup

Install the following packages through Package Manager:

  • com.unity.commondialog.ps4
  • com.unity.inputsystem.ps4
  • com.unity.nptoolkit2.ps4
  • com.unity.render-pipelines.ps4
  • com.unity.savedata.ps4-1.0.6

Info

You can find all required packages on the Unity Discussions forum. A Unity Pro license is required.

Check that all UpscaleSDK.Platform.PS4 assembly references are configured correctly.

PS4

Trophies

Ps4Trophies is the PS4 player-award API. Trophy IDs map to the values registered in your .trp file.

Unlocking

Ps4Trophies.Unlock(1);

Saves

Game code talks to the cross-platform UPSSaves.Prefs / UPSSaves.Saver APIs (see Manual → Saves). The PS4-specific bits are the storage allocation size (SavesSettings.SaveSize in MB) and the underlying PS4FileSystem implementation, which routes calls through Sony's save-data service.

Error handling

Save-data error handling on PS4 is automatic. When a save or load fails with no space or broken data, PS4FileSystem opens the appropriate Sony system message dialog (NoSpaceContinuable, Corrupted) and forwards a human-readable message through ErrorHandler.RaiseError(...). You don't need to author your own canvas or wire up per-error UI - the platform layer handles both the OS dialog and the error event.

Info

If you need to intercept the errors from game code, subscribe to ErrorHandler.OnError (see Manual → Saves → Error handling).