SteamUserStats
public struct SteamUserStats: Sendable
Steamworks ISteamUserStats
Access via userStats
.
Topics
func attachLeaderboardUGC(steamLeaderboard: SteamLeaderboard, ugc: UGCHandle, completion: (sending LeaderboardUGCSet?) -> Void)
func attachLeaderboardUGC(steamLeaderboard: SteamLeaderboard, ugc: UGCHandle, completion: (sending LeaderboardUGCSet?) -> Void)
Steamworks ISteamUserStats::AttachLeaderboardUGC()
, callback
Declaration
public func attachLeaderboardUGC(
steamLeaderboard: SteamLeaderboard, ugc: UGCHandle,
completion: @Sendable @escaping (sending LeaderboardUGCSet?) -> Void)
func attachLeaderboardUGC(isolation: isolated (any Actor)?, steamLeaderboard: SteamLeaderboard, ugc: UGCHandle) async -> LeaderboardUGCSet?
func attachLeaderboardUGC(isolation: isolated (any Actor)?, steamLeaderboard: SteamLeaderboard, ugc: UGCHandle) async -> LeaderboardUGCSet?
Steamworks ISteamUserStats::AttachLeaderboardUGC()
, async
Declaration
public func attachLeaderboardUGC(
isolation: isolated (any Actor)? = #isolation,
steamLeaderboard: SteamLeaderboard, ugc: UGCHandle
) async -> LeaderboardUGCSet?
func clearAchievement(name: String) -> Bool
func clearAchievement(name: String) -> Bool
func downloadLeaderboardEntries(steamLeaderboard: SteamLeaderboard, leaderboardDataRequest: LeaderboardDataRequest, rangeStart: Int, rangeEnd: Int, completion: (sending LeaderboardScoresDownloaded?) -> Void)
func downloadLeaderboardEntries(steamLeaderboard: SteamLeaderboard, leaderboardDataRequest: LeaderboardDataRequest, rangeStart: Int, rangeEnd: Int, completion: (sending LeaderboardScoresDownloaded?) -> Void)
Steamworks ISteamUserStats::DownloadLeaderboardEntries()
, callback
Declaration
public func downloadLeaderboardEntries(
steamLeaderboard: SteamLeaderboard,
leaderboardDataRequest: LeaderboardDataRequest, rangeStart: Int,
rangeEnd: Int,
completion: @Sendable @escaping (sending LeaderboardScoresDownloaded?) ->
Void)
func downloadLeaderboardEntries(isolation: isolated (any Actor)?, steamLeaderboard: SteamLeaderboard, leaderboardDataRequest: LeaderboardDataRequest, rangeStart: Int, rangeEnd: Int) async -> LeaderboardScoresDownloaded?
func downloadLeaderboardEntries(isolation: isolated (any Actor)?, steamLeaderboard: SteamLeaderboard, leaderboardDataRequest: LeaderboardDataRequest, rangeStart: Int, rangeEnd: Int) async -> LeaderboardScoresDownloaded?
Steamworks ISteamUserStats::DownloadLeaderboardEntries()
, async
Declaration
public func downloadLeaderboardEntries(
isolation: isolated (any Actor)? = #isolation,
steamLeaderboard: SteamLeaderboard,
leaderboardDataRequest: LeaderboardDataRequest, rangeStart: Int,
rangeEnd: Int
) async -> LeaderboardScoresDownloaded?
func downloadLeaderboardEntriesForUsers(steamLeaderboard: SteamLeaderboard, users: [SteamID], completion: (sending LeaderboardScoresDownloaded?) -> Void)
func downloadLeaderboardEntriesForUsers(steamLeaderboard: SteamLeaderboard, users: [SteamID], completion: (sending LeaderboardScoresDownloaded?) -> Void)
Steamworks ISteamUserStats::DownloadLeaderboardEntriesForUsers()
, callback
Declaration
public func downloadLeaderboardEntriesForUsers(
steamLeaderboard: SteamLeaderboard, users: [SteamID],
completion: @Sendable @escaping (sending LeaderboardScoresDownloaded?) ->
Void)
func downloadLeaderboardEntriesForUsers(isolation: isolated (any Actor)?, steamLeaderboard: SteamLeaderboard, users: [SteamID]) async -> LeaderboardScoresDownloaded?
func downloadLeaderboardEntriesForUsers(isolation: isolated (any Actor)?, steamLeaderboard: SteamLeaderboard, users: [SteamID]) async -> LeaderboardScoresDownloaded?
Steamworks ISteamUserStats::DownloadLeaderboardEntriesForUsers()
, async
Declaration
public func downloadLeaderboardEntriesForUsers(
isolation: isolated (any Actor)? = #isolation,
steamLeaderboard: SteamLeaderboard, users: [SteamID]
) async -> LeaderboardScoresDownloaded?
func findLeaderboard(leaderboardName: String, completion: (sending LeaderboardFindResult?) -> Void)
func findLeaderboard(leaderboardName: String, completion: (sending LeaderboardFindResult?) -> Void)
Steamworks ISteamUserStats::FindLeaderboard()
, callback
Declaration
public func findLeaderboard(
leaderboardName: String,
completion: @Sendable @escaping (sending LeaderboardFindResult?) -> Void)
func findLeaderboard(isolation: isolated (any Actor)?, leaderboardName: String) async -> LeaderboardFindResult?
func findLeaderboard(isolation: isolated (any Actor)?, leaderboardName: String) async -> LeaderboardFindResult?
Steamworks ISteamUserStats::FindLeaderboard()
, async
Declaration
public func findLeaderboard(
isolation: isolated (any Actor)? = #isolation, leaderboardName: String
) async -> LeaderboardFindResult?
func findOrCreateLeaderboard(leaderboardName: String, leaderboardSortMethod: LeaderboardSortMethod, leaderboardDisplayType: LeaderboardDisplayType, completion: (sending LeaderboardFindResult?) -> Void)
func findOrCreateLeaderboard(leaderboardName: String, leaderboardSortMethod: LeaderboardSortMethod, leaderboardDisplayType: LeaderboardDisplayType, completion: (sending LeaderboardFindResult?) -> Void)
Steamworks ISteamUserStats::FindOrCreateLeaderboard()
, callback
Declaration
public func findOrCreateLeaderboard(
leaderboardName: String, leaderboardSortMethod: LeaderboardSortMethod,
leaderboardDisplayType: LeaderboardDisplayType,
completion: @Sendable @escaping (sending LeaderboardFindResult?) -> Void)
func findOrCreateLeaderboard(isolation: isolated (any Actor)?, leaderboardName: String, leaderboardSortMethod: LeaderboardSortMethod, leaderboardDisplayType: LeaderboardDisplayType) async -> LeaderboardFindResult?
func findOrCreateLeaderboard(isolation: isolated (any Actor)?, leaderboardName: String, leaderboardSortMethod: LeaderboardSortMethod, leaderboardDisplayType: LeaderboardDisplayType) async -> LeaderboardFindResult?
Steamworks ISteamUserStats::FindOrCreateLeaderboard()
, async
Declaration
public func findOrCreateLeaderboard(
isolation: isolated (any Actor)? = #isolation, leaderboardName: String,
leaderboardSortMethod: LeaderboardSortMethod,
leaderboardDisplayType: LeaderboardDisplayType
) async -> LeaderboardFindResult?
func getAchievement(name: String) -> (rc: Bool, achieved: Bool)
func getAchievement(name: String) -> (rc: Bool, achieved: Bool)
func getAchievementAchievedPercent(name: String) -> (rc: Bool, percent: Float)
func getAchievementAchievedPercent(name: String) -> (rc: Bool, percent: Float)
func getAchievementAndUnlockTime(name: String) -> (rc: Bool, achieved: Bool, unlockTime: RTime32)
func getAchievementAndUnlockTime(name: String) -> (rc: Bool, achieved: Bool, unlockTime: RTime32)
func getAchievementDisplayAttribute(name: String, key: String) -> String
func getAchievementDisplayAttribute(name: String, key: String) -> String
func getAchievementIcon(name: String) -> Int
func getAchievementIcon(name: String) -> Int
func getAchievementName(achievementIndex: Int) -> String
func getAchievementName(achievementIndex: Int) -> String
func getAchievementProgressLimitsFloat(name: String) -> (rc: Bool, minProgress: Float, maxProgress: Float)
func getAchievementProgressLimitsFloat(name: String) -> (rc: Bool, minProgress: Float, maxProgress: Float)
func getAchievementProgressLimitsInt(name: String) -> (rc: Bool, minProgress: Int, maxProgress: Int)
func getAchievementProgressLimitsInt(name: String) -> (rc: Bool, minProgress: Int, maxProgress: Int)
func getDownloadedLeaderboardEntry(steamLeaderboardEntries: SteamLeaderboardEntries, index: Int, detailsMax: Int) -> (rc: Bool, leaderboardEntry: LeaderboardEntry, details: [Int])
func getDownloadedLeaderboardEntry(steamLeaderboardEntries: SteamLeaderboardEntries, index: Int, detailsMax: Int) -> (rc: Bool, leaderboardEntry: LeaderboardEntry, details: [Int])
Steamworks ISteamUserStats::GetDownloadedLeaderboardEntry()
Declaration
public func getDownloadedLeaderboardEntry(
steamLeaderboardEntries: SteamLeaderboardEntries, index: Int,
detailsMax: Int
) -> (rc: Bool, leaderboardEntry: LeaderboardEntry, details: [Int])
func getGlobalStatDouble(statName: String) -> (rc: Bool, data: Double)
func getGlobalStatDouble(statName: String) -> (rc: Bool, data: Double)
func getGlobalStatHistoryDouble(statName: String, dataSize: Int) -> (rc: Int, data: [Double])
func getGlobalStatHistoryDouble(statName: String, dataSize: Int) -> (rc: Int, data: [Double])
func getGlobalStatHistoryInt(statName: String, dataSize: Int) -> (rc: Int, data: [Int])
func getGlobalStatHistoryInt(statName: String, dataSize: Int) -> (rc: Int, data: [Int])
func getGlobalStatInt(statName: String) -> (rc: Bool, data: Int)
func getGlobalStatInt(statName: String) -> (rc: Bool, data: Int)
func getLeaderboardDisplayType(steamLeaderboard: SteamLeaderboard) -> LeaderboardDisplayType
func getLeaderboardDisplayType(steamLeaderboard: SteamLeaderboard) -> LeaderboardDisplayType
Steamworks ISteamUserStats::GetLeaderboardDisplayType()
Declaration
public func getLeaderboardDisplayType(steamLeaderboard: SteamLeaderboard)
-> LeaderboardDisplayType
func getLeaderboardEntryCount(steamLeaderboard: SteamLeaderboard) -> Int
func getLeaderboardEntryCount(steamLeaderboard: SteamLeaderboard) -> Int
Steamworks ISteamUserStats::GetLeaderboardEntryCount()
Declaration
public func getLeaderboardEntryCount(steamLeaderboard: SteamLeaderboard) -> Int
func getLeaderboardName(steamLeaderboard: SteamLeaderboard) -> String
func getLeaderboardName(steamLeaderboard: SteamLeaderboard) -> String
Steamworks ISteamUserStats::GetLeaderboardName()
Declaration
public func getLeaderboardName(steamLeaderboard: SteamLeaderboard) -> String
func getLeaderboardSortMethod(steamLeaderboard: SteamLeaderboard) -> LeaderboardSortMethod
func getLeaderboardSortMethod(steamLeaderboard: SteamLeaderboard) -> LeaderboardSortMethod
Steamworks ISteamUserStats::GetLeaderboardSortMethod()
Declaration
public func getLeaderboardSortMethod(steamLeaderboard: SteamLeaderboard)
-> LeaderboardSortMethod
func getMostAchievedAchievementInfo(nameBufLen: Int) -> (rc: Int, name: String, percent: Float, achieved: Bool)
func getMostAchievedAchievementInfo(nameBufLen: Int) -> (rc: Int, name: String, percent: Float, achieved: Bool)
func getNextMostAchievedAchievementInfo(iteratorPreviousIndex: Int, nameBufLen: Int) -> (rc: Int, name: String, percent: Float, achieved: Bool)
func getNextMostAchievedAchievementInfo(iteratorPreviousIndex: Int, nameBufLen: Int) -> (rc: Int, name: String, percent: Float, achieved: Bool)
func getNumAchievements() -> Int
func getNumAchievements() -> Int
Steamworks ISteamUserStats::GetNumAchievements()
Declaration
public func getNumAchievements() -> Int
func getNumberOfCurrentPlayers(completion: (sending NumberOfCurrentPlayers?) -> Void)
func getNumberOfCurrentPlayers(completion: (sending NumberOfCurrentPlayers?) -> Void)
Steamworks ISteamUserStats::GetNumberOfCurrentPlayers()
, callback
Declaration
public func getNumberOfCurrentPlayers(
completion: @Sendable @escaping (sending NumberOfCurrentPlayers?) -> Void)
func getNumberOfCurrentPlayers(isolation: isolated (any Actor)?) async -> NumberOfCurrentPlayers?
func getNumberOfCurrentPlayers(isolation: isolated (any Actor)?) async -> NumberOfCurrentPlayers?
Steamworks ISteamUserStats::GetNumberOfCurrentPlayers()
, async
Declaration
public func getNumberOfCurrentPlayers(
isolation: isolated (any Actor)? = #isolation
) async -> NumberOfCurrentPlayers?
func getStatFloat(name: String) -> (rc: Bool, data: Float)
func getStatFloat(name: String) -> (rc: Bool, data: Float)
func getStatInt(name: String) -> (rc: Bool, data: Int)
func getStatInt(name: String) -> (rc: Bool, data: Int)
func getUserAchievement(user: SteamID, name: String) -> (rc: Bool, achieved: Bool)
func getUserAchievement(user: SteamID, name: String) -> (rc: Bool, achieved: Bool)
func getUserAchievementAndUnlockTime(user: SteamID, name: String) -> (rc: Bool, achieved: Bool, unlockTime: RTime32)
func getUserAchievementAndUnlockTime(user: SteamID, name: String) -> (rc: Bool, achieved: Bool, unlockTime: RTime32)
func getUserStatFloat(user: SteamID, name: String) -> (rc: Bool, data: Float)
func getUserStatFloat(user: SteamID, name: String) -> (rc: Bool, data: Float)
func getUserStatInt(user: SteamID, name: String) -> (rc: Bool, data: Int)
func getUserStatInt(user: SteamID, name: String) -> (rc: Bool, data: Int)
func indicateAchievementProgress(name: String, curProgress: Int, maxProgress: Int) -> Bool
func indicateAchievementProgress(name: String, curProgress: Int, maxProgress: Int) -> Bool
func requestGlobalAchievementPercentages(completion: (sending GlobalAchievementPercentagesReady?) -> Void)
func requestGlobalAchievementPercentages(completion: (sending GlobalAchievementPercentagesReady?) -> Void)
Steamworks ISteamUserStats::RequestGlobalAchievementPercentages()
, callback
Declaration
public func requestGlobalAchievementPercentages(
completion: @Sendable @escaping (sending GlobalAchievementPercentagesReady?)
-> Void)
func requestGlobalAchievementPercentages(isolation: isolated (any Actor)?) async -> GlobalAchievementPercentagesReady?
func requestGlobalAchievementPercentages(isolation: isolated (any Actor)?) async -> GlobalAchievementPercentagesReady?
Steamworks ISteamUserStats::RequestGlobalAchievementPercentages()
, async
Declaration
public func requestGlobalAchievementPercentages(
isolation: isolated (any Actor)? = #isolation
) async -> GlobalAchievementPercentagesReady?
func requestGlobalStats(historyDays: Int, completion: (sending GlobalStatsReceived?) -> Void)
func requestGlobalStats(historyDays: Int, completion: (sending GlobalStatsReceived?) -> Void)
Steamworks ISteamUserStats::RequestGlobalStats()
, callback
Declaration
public func requestGlobalStats(
historyDays: Int,
completion: @Sendable @escaping (sending GlobalStatsReceived?) -> Void)
func requestGlobalStats(isolation: isolated (any Actor)?, historyDays: Int) async -> GlobalStatsReceived?
func requestGlobalStats(isolation: isolated (any Actor)?, historyDays: Int) async -> GlobalStatsReceived?
Steamworks ISteamUserStats::RequestGlobalStats()
, async
Declaration
public func requestGlobalStats(
isolation: isolated (any Actor)? = #isolation, historyDays: Int
) async -> GlobalStatsReceived?
func requestUserStats(user: SteamID, completion: (sending UserStatsReceived?) -> Void)
func requestUserStats(user: SteamID, completion: (sending UserStatsReceived?) -> Void)
Steamworks ISteamUserStats::RequestUserStats()
, callback
Declaration
public func requestUserStats(
user: SteamID,
completion: @Sendable @escaping (sending UserStatsReceived?) -> Void)
func requestUserStats(isolation: isolated (any Actor)?, user: SteamID) async -> UserStatsReceived?
func requestUserStats(isolation: isolated (any Actor)?, user: SteamID) async -> UserStatsReceived?
Steamworks ISteamUserStats::RequestUserStats()
, async
Declaration
public func requestUserStats(
isolation: isolated (any Actor)? = #isolation, user: SteamID
) async -> UserStatsReceived?
func resetAllStats(achievementsToo: Bool) -> Bool
func resetAllStats(achievementsToo: Bool) -> Bool
func setAchievement(name: String) -> Bool
func setAchievement(name: String) -> Bool
func setStat(name: String, data: Float) -> Bool
func setStat(name: String, data: Float) -> Bool
func setStat(name: String, data: Int) -> Bool
func setStat(name: String, data: Int) -> Bool
func storeStats() -> Bool
func storeStats() -> Bool
func updateAvgRateStat(name: String, countThisSession: Float, sessionLength: Double) -> Bool
func updateAvgRateStat(name: String, countThisSession: Float, sessionLength: Double) -> Bool
func uploadLeaderboardScore(steamLeaderboard: SteamLeaderboard, leaderboardUploadScoreMethod: LeaderboardUploadScoreMethod, score: Int, scoreDetails: [Int], completion: (sending LeaderboardScoreUploaded?) -> Void)
func uploadLeaderboardScore(steamLeaderboard: SteamLeaderboard, leaderboardUploadScoreMethod: LeaderboardUploadScoreMethod, score: Int, scoreDetails: [Int], completion: (sending LeaderboardScoreUploaded?) -> Void)
Steamworks ISteamUserStats::UploadLeaderboardScore()
, callback
Declaration
public func uploadLeaderboardScore(
steamLeaderboard: SteamLeaderboard,
leaderboardUploadScoreMethod: LeaderboardUploadScoreMethod, score: Int,
scoreDetails: [Int],
completion: @Sendable @escaping (sending LeaderboardScoreUploaded?) -> Void)
func uploadLeaderboardScore(isolation: isolated (any Actor)?, steamLeaderboard: SteamLeaderboard, leaderboardUploadScoreMethod: LeaderboardUploadScoreMethod, score: Int, scoreDetails: [Int]) async -> LeaderboardScoreUploaded?
func uploadLeaderboardScore(isolation: isolated (any Actor)?, steamLeaderboard: SteamLeaderboard, leaderboardUploadScoreMethod: LeaderboardUploadScoreMethod, score: Int, scoreDetails: [Int]) async -> LeaderboardScoreUploaded?
Steamworks ISteamUserStats::UploadLeaderboardScore()
, async
Declaration
public func uploadLeaderboardScore(
isolation: isolated (any Actor)? = #isolation,
steamLeaderboard: SteamLeaderboard,
leaderboardUploadScoreMethod: LeaderboardUploadScoreMethod, score: Int,
scoreDetails: [Int]
) async -> LeaderboardScoreUploaded?