Skip to content

Add FileShare API support for use with Leaderboard.AttachUgc#824

Open
kellydornhaus wants to merge 2 commits intoFacepunch:masterfrom
kellydornhaus:file-share
Open

Add FileShare API support for use with Leaderboard.AttachUgc#824
kellydornhaus wants to merge 2 commits intoFacepunch:masterfrom
kellydornhaus:file-share

Conversation

@kellydornhaus
Copy link
Copy Markdown

Summary

  • Implements SteamRemoteStorage.FileShareAsync() method
  • Returns UGC handle that can be used with leaderboard attachments
  • Leaderboards already had AttachUgc but the only way to create this wrapper for UGCHandle_t in the Steam APIs is FileShare, which was not exposed.

Usage

// Share a file from Steam Cloud
var ugc = await SteamRemoteStorage.FileShareAsync("myfile.txt");

// Attach to leaderboard
if (ugc.HasValue)
    await leaderboard.AttachUgc(ugc.Value);

Implements GetNumBetas, GetBetaInfo, and SetActiveBeta Steam APIs that were missing from the library. These APIs allow applications to query available beta branches and programmatically switch between them.

New APIs added:
- SteamApps.GetBetaCount() - Get total number of beta branches with breakdown of available/private counts
- SteamApps.GetBetaInfo() - Get detailed information about a specific beta branch by index
- SteamApps.GetBetaInformation() - Get enumerable of all available beta branches
- SteamApps.SetActiveBeta() - Set the active beta branch for the application

Also adds BetaInformation struct with convenient property accessors for beta branch flags (IsDefault, IsAvailable, IsPrivate, IsSelected, IsInstalled).

The low-level Steam API bindings were already generated, this change adds the high-level C# wrapper methods following existing code patterns in SteamApps.cs.
Implements SteamRemoteStorage.FileShareAsync() method to share Steam Cloud files with the community, returning a UGC handle that can be used with leaderboard attachments.

- Add FileShareAsync method to SteamRemoteStorage class
- Enhance Ugc struct with public constructors and implicit conversions
- Enable creation of Ugc objects from shared file handles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant