Facepunch.Steamworks Wiki
Home
/
Edit Steamworks.SteamUserStats.PlayerCountAsync
View
Edit
History
No Category
Getting Started
Installing
Dedicated Servers
Interfaces
Classes & Structs
Enums
General
Friends
Inventory
Servers
Workshop
Stats & Achievements
Networking
Unity Specific
Log in to edit
Steamworks.SteamUserStats.PlayerCountAsync
<member category="interface" type="method" namespace="Steamworks" parent="SteamUserStats" name="PlayerCountAsync" async="true" static="true"> <return type="Task<int>"></return> <summary>Tries to get the number of players currently playing this game. Or -1 if failed.</summary> </member>
Facepunch.Steamworks Wiki
Facepunch.Steamworks
Getting Started
3
About Facepunch.Steamworks
Frequently Asked Questions
Setting Up
Installing
1
Installing For Unity
Dedicated Servers
1
Server Library
Api Documentation
Interfaces
23
SteamApps
OnDlcInstalled
OnNewLaunchParameters
AppOwner
AvailableLanguages
BuildId
CommandLine
CurrentBetaName
GameLanguage
IsCybercafe
IsLowViolence
IsSubscribed
IsSubscribedFromFamilySharing
IsSubscribedFromFreeWeekend
IsVACBanned
AppInstallDir
DlcDownloadProgress
DlcInformation
GetFileDetailsAsync
GetLaunchParam
InstallDlc
InstalledDepots
IsAppInstalled
IsDlcInstalled
IsSubscribedToApp
MarkContentCorrupt
PurchaseTime
UninstallDlc
SteamClient
AppId
IsLoggedOn
IsValid
Name
State
SteamId
Init
RestartAppIfNecessary
RunCallbacks
Shutdown
SteamFriends
OnChatMessage
OnFriendRichPresenceUpdate
OnGameLobbyJoinRequested
OnGameOverlayActivated
OnGameRichPresenceJoinRequested
OnGameServerChangeRequested
OnPersonaStateChange
ListenForFriendsMessages
ClearRichPresence
GetBlocked
GetFollowerCount
GetFollowingList
GetFriends
GetFriendsClanMembers
GetFriendsOnGameServer
GetFriendsRequested
GetFriendsRequestingFriendship
GetFromSource
GetLargeAvatarAsync
GetMediumAvatarAsync
GetPlayedWith
GetRichPresence
GetSmallAvatarAsync
IsFollowing
OpenGameInviteOverlay
OpenOverlay
OpenStoreOverlay
OpenUserOverlay
OpenWebOverlay
RequestUserInformation
SetPlayedWith
SetRichPresence
SteamInput
Controllers
GetDigitalActionGlyph
RunFrame
SteamInventory
OnDefinitionsUpdated
OnInventoryUpdated
Currency
Definitions
Items
AddPromoItemAsync
CraftItemAsync
DeserializeAsync
FindDefinition
GenerateItemAsync
GetAllItems
GetAllItemsAsync
GetDefinitionsWithPricesAsync
GrantPromoItemsAsync
LoadItemDefinitions
StartPurchaseAsync
TriggerItemDropAsync
WaitForDefinitions
SteamMatchmaking
OnChatMessage
OnLobbyCreated
OnLobbyDataChanged
OnLobbyEntered
OnLobbyGameCreated
OnLobbyInvite
OnLobbyMemberBanned
OnLobbyMemberDataChanged
OnLobbyMemberDisconnected
OnLobbyMemberJoined
OnLobbyMemberKicked
OnLobbyMemberLeave
LobbyList
CreateLobbyAsync
GetFavoriteServers
GetHistoryServers
JoinLobbyAsync
SteamMusic
OnPlaybackChanged
OnVolumeChanged
IsEnabled
IsPlaying
Status
Volume
Pause
Play
PlayNext
PlayPrevious
SteamNetworking
OnP2PConnectionFailed
OnP2PSessionRequest
AcceptP2PSessionWithUser
AllowP2PPacketRelay
CloseP2PSessionWithUser
IsP2PPacketAvailable
ReadP2PPacket
SendP2PPacket
SteamNetworkingSockets
OnConnectionStatusChanged
ConnectNormal
ConnectRelay
CreateNormalSocket
CreateRelaySocket
SteamNetworkingUtils
OnDebugOutput
ConnectionTimeout
DebugLevel
FakeRecvPacketLag
FakeRecvPacketLoss
FakeSendPacketLag
FakeSendPacketLoss
LocalPingLocation
LocalTimestamp
SendBufferSize
Status
Timeout
EstimatePingTo
InitRelayNetworkAccess
WaitForPingDataAsync
SteamParental
OnSettingsChanged
IsParentalLockEnabled
IsParentalLockLocked
BIsAppInBlockList
BIsFeatureInBlockList
IsAppBlocked
IsFeatureBlocked
SteamParties
OnActiveBeaconsUpdated
OnBeaconLocationsUpdated
ActiveBeaconCount
ActiveBeacons
SteamRemotePlay
OnSessionConnected
OnSessionDisconnected
SessionCount
GetSession
SendInvite
SteamRemoteStorage
FileCount
Files
IsCloudEnabled
IsCloudEnabledForAccount
IsCloudEnabledForApp
QuotaBytes
QuotaRemainingBytes
QuotaUsedBytes
FileDelete
FileExists
FileForget
FilePersisted
FileRead
FileSize
FileTime
FileWrite
SteamScreenshots
OnScreenshotFailed
OnScreenshotReady
OnScreenshotRequested
Hooked
AddScreenshot
TriggerScreenshot
WriteScreenshot
SteamServer
OnSteamNetAuthenticationStatus
OnSteamServerConnectFailure
OnSteamServersConnected
OnSteamServersDisconnected
OnValidateAuthTicketResponse
AutomaticHeartbeatRate
AutomaticHeartbeats
BotCount
DedicatedServer
GameDescription
GameTags
IsValid
LoggedOn
MapName
MaxPlayers
ModDir
Passworded
Product
PublicIp
ServerName
SteamId
BeginAuthSession
ClearKeys
EndSession
ForceHeartbeat
GetOutgoingPacket
HandleIncomingPacket
Init
LogOff
LogOnAnonymous
RunCallbacks
SetKey
Shutdown
UpdatePlayer
UserHasLicenseForApp
SteamServerStats
ClearAchievement
GetAchievement
GetFloat
GetInt
RequestUserStatsAsync
SetAchievement
SetFloat
SetInt
StoreUserStats
SteamUGC
OnDownloadItemResult
DeleteFileAsync
Download
DownloadAsync
QueryFileAsync
StartPlaytimeTracking
StopPlaytimeTracking
StopPlaytimeTrackingForAllItems
SteamUser
OnClientGameServerDeny
OnDurationControl
OnGameWebCallback
OnLicensesUpdated
OnMicroTxnAuthorizationResponse
OnSteamServerConnectFailure
OnSteamServersConnected
OnSteamServersDisconnected
OnValidateAuthTicketResponse
HasVoiceData
IsBehindNAT
IsPhoneIdentifying
IsPhoneRequiringVerification
IsPhoneVerified
IsTwoFactorEnabled
OptimalSampleRate
SampleRate
SteamLevel
VoiceRecord
BeginAuthSession
DecompressVoice
EndAuthSession
GetAuthSessionTicket
GetAuthSessionTicketAsync
GetDurationControl
GetStoreAuthUrlAsync
ReadVoiceData
ReadVoiceDataBytes
RequestEncryptedAppTicketAsync
SteamUserStats
OnAchievementProgress
OnUserStatsReceived
OnUserStatsStored
OnUserStatsUnloaded
Achievements
StatsRecieved
AddStat
FindLeaderboardAsync
FindOrCreateLeaderboardAsync
GetStatFloat
GetStatInt
IndicateAchievementProgress
PlayerCountAsync
RequestCurrentStats
RequestGlobalStatsAsync
ResetAll
SetStat
StoreStats
SteamUtils
OnGamepadTextInputDismissed
OnIpCountryChanged
OnLowBatteryPower
OnSteamShutdown
ConnectedUniverse
CurrentBatteryPower
DoesOverlayNeedPresent
IpCountry
IsOverlayEnabled
IsSteamChinaLauncher
IsSteamInBigPictureMode
IsSteamRunningInVR
OverlayNotificationPosition
SecondsSinceAppActive
SecondsSinceComputerActive
SteamServerTime
SteamUILanguage
UsingBatteryPower
VrHeadsetStreaming
CheckFileSignatureAsync
GetEnteredGamepadText
GetImage
GetImageSize
SetOverlayNotificationInset
ShowGamepadTextInput
StartVRDashboard
SteamVideo
OnBroadcastStarted
OnBroadcastStopped
IsBroadcasting
NumViewers
SteamNetworkingMessages
Classes & Structs
58
Achievement
Description
GlobalUnlocked
Identifier
Name
State
UnlockTime
Clear
GetIcon
GetIconAsync
Trigger
Amount
Item
Quantity
AnalogState
EMode
X
Y
Active
AppId
Value
AuthTicket
Data
Handle
Cancel
Dispose
Color
a
b
g
r
Connection
ConnectionName
Id
UserData
Accept
Close
DetailedStatus
Flush
SendMessage
ConnectionInfo
Address
EndReason
Identity
State
ConnectionManager
Connected
Connecting
Connection
ConnectionInfo
ConnectionName
Interface
UserData
Close
OnConnected
OnConnecting
OnConnectionChanged
OnDisconnected
OnMessage
Receive
Controller
ActionSet
Id
InputType
ActivateLayer
ClearLayers
DeactivateLayer
GetAnalogState
GetDigitalState
DepotId
Value
DigitalState
Active
Pressed
Dispatch
OnDebugCallback
OnException
DlcInformation
AppId
Available
Name
DownloadProgress
Active
BytesDownloaded
BytesTotal
DurationControl
Appid
Applicable
FileDetails
Flags
Sha1
SizeInBytes
Friend
Id
GameInfo
IsAway
IsBlocked
IsBusy
IsFriend
IsMe
IsOnline
IsPlayingThisGame
IsSnoozing
Name
NameHistory
Relationship
State
SteamLevel
GetAchievement
GetAchievementUnlockTime
GetLargeAvatarAsync
GetMediumAvatarAsync
GetRichPresence
GetSmallAvatarAsync
GetStatFloat
GetStatInt
InviteToGame
IsIn
RequestInfoAsync
RequestUserStatsAsync
SendMessage
FriendGameInfo
ConnectionPort
QueryPort
IpAddress
IpAddressRaw
Lobby
GameId
Value
IConnectionManager
OnConnected
OnConnecting
OnDisconnected
OnMessage
Image
Data
Height
Width
GetPixel
Ingredient
Count
Definition
DefinitionId
InventoryDef
Created
Description
ExchangeSchema
IconUrl
IconUrlLarge
Id
IsGenerator
LocalBasePrice
LocalBasePriceFormatted
LocalPrice
LocalPriceFormatted
Marketable
Modified
Name
PriceCategory
Properties
Tradable
Type
GetBoolProperty
GetProperty
GetRecipes
GetRecipesContainingThis
InventoryDefId
Value
InventoryItem
Acquired
Def
DefId
Id
IsConsumed
IsNoTrade
IsRemoved
Origin
Properties
Quantity
AddAsync
ConsumeAsync
SplitStackAsync
InventoryItemId
Value
InventoryPurchaseResult
OrderID
Result
TransID
InventoryRecipe
Ingredients
Result
Source
InventoryResult
Expired
ItemCount
BelongsTo
Dispose
GetItems
Serialize
ISocketManager
OnConnected
OnConnecting
OnDisconnected
OnMessage
Leaderboard
Display
EntryCount
Name
Sort
AttachUgc
GetScoresAroundUserAsync
GetScoresAsync
GetScoresFromFriendsAsync
ReplaceScore
SubmitScoreAsync
LeaderboardEntry
Details
GlobalRank
Score
User
LeaderboardUpdate
Changed
NewGlobalRank
OldGlobalRank
Score
RankChange
Lobby
Data
Id
MaxMembers
MemberCount
Members
Owner
DeleteData
GetData
GetGameServer
GetMemberData
InviteFriend
IsOwnedBy
Join
Leave
Refresh
SendChatString
SetData
SetFriendsOnly
SetGameServer
SetInvisible
SetJoinable
SetMemberData
SetPrivate
SetPublic
LobbyQuery
FilterDistanceClose
FilterDistanceFar
FilterDistanceWorldwide
OrderByNear
RequestAsync
WithEqual
WithHigher
WithKeyValue
WithLower
WithMaxResults
WithNotEqual
WithSlotsAvailable
NetAddress
Cleared
AnyIp
From
LocalHost
Address
IsIPv4
IsIPv6AllZeros
IsLocalHost
Port
NetIdentity
LocalHost
Address
IsIpAddress
IsLocalHost
IsSteamId
SteamId
NetPingLocation
TryParseFromString
EstimatePingTo
OutgoingPacket
Address
Data
Port
Size
P2Packet
Data
SteamId
PartyBeacon
MetaData
Owner
CancelReservation
Destroy
JoinAsync
OnReservationCompleted
PublishedFileId
Value
RemotePlaySession
ClientName
FormFactor
Id
IsValid
SteamId
Screenshot
SetLocation
TagPublishedFile
TagUser
ServerInfo
Address
AddressRaw
AppId
BotPlayers
ConnectionPort
Description
GameDir
LastTimePlayed
Map
MaxPlayers
Name
Passworded
Ping
Players
QueryPort
Secure
SteamId
Tags
TagString
Version
AddToFavourites
AddToHistory
QueryRulesAsync
RemoveFromFavourites
RemoveFromHistory
ServerList
Base
OnChanges
OnResponsiveServer
Responsive
Unresponsive
AppId
AddFilter
Cancel
Dispose
RunQueryAsync
UpdateResponsive
Favourites
OnChanges
OnResponsiveServer
Responsive
Unresponsive
AppId
AddFilter
Cancel
Dispose
RunQueryAsync
UpdateResponsive
Friends
OnChanges
OnResponsiveServer
Responsive
Unresponsive
AppId
AddFilter
Cancel
Dispose
RunQueryAsync
UpdateResponsive
History
OnChanges
OnResponsiveServer
Responsive
Unresponsive
AppId
AddFilter
Cancel
Dispose
RunQueryAsync
UpdateResponsive
Internet
OnChanges
OnResponsiveServer
Responsive
Unresponsive
AppId
AddFilter
Cancel
Dispose
RunQueryAsync
UpdateResponsive
IpList
Ips
OnChanges
OnResponsiveServer
Responsive
Unresponsive
AppId
AddFilter
Cancel
Dispose
RunQueryAsync
UpdateResponsive
LocalNetwork
OnChanges
OnResponsiveServer
Responsive
Unresponsive
AppId
AddFilter
Cancel
Dispose
RunQueryAsync
UpdateResponsive
Socket
Manager
Close
SocketManager
Connected
Connecting
Interface
Socket
Close
OnConnected
OnConnecting
OnConnectionChanged
OnDisconnected
OnMessage
Receive
Stat
Name
UserId
Add
GetFloat
GetGlobalFloat
GetGlobalFloatDays
GetGlobalInt
GetGlobalIntDaysAsync
GetInt
Set
Store
UpdateAverageRate
SteamId
Value
AccountId
IsValid
SteamServerInit
DedicatedServer
GameDescription
GamePort
IpAddress
ModDir
QueryPort
Secure
SteamPort
VersionString
WithQueryShareGamePort
WithRandomSteamPort
Ugc
Editor
NewCommunityFile
NewMicrotransactionFile
AddKeyValueTag
ForAppId
InLanguage
SubmitAsync
WithChangeLog
WithContent
WithDescription
WithFriendsOnlyVisibility
WithMetaData
WithPreviewFile
WithPrivateVisibility
WithPublicVisibility
WithTag
WithTitle
Item
GetAsync
ChangelogUrl
CommentsUrl
ConsumerApp
Created
CreatorApp
Description
Directory
DiscussUrl
DownloadAmount
DownloadBytesDownloaded
DownloadBytesTotal
Id
IsAcceptedForUse
IsBanned
IsDownloading
IsDownloadPending
IsFriendsOnly
IsInstalled
IsPrivate
IsPublic
IsSubscribed
NeedsUpdate
NumComments
NumFavorites
NumFollowers
NumPlaytimeSessions
NumPlaytimeSessionsDuringTimePeriod
NumSecondsPlayed
NumSecondsPlayedDuringTimePeriod
NumSubscriptions
NumUniqueFavorites
NumUniqueFollowers
NumUniqueSubscriptions
NumUniqueWebsiteViews
Owner
PreviewImageUrl
ReportScore
Result
Score
SizeBytes
StatsUrl
Tags
Title
Updated
Url
VotesDown
VotesUp
AddFavorite
Download
DownloadAsync
Edit
GetUserVote
HasTag
RemoveFavorite
Subscribe
Unsubscribe
Vote
PublishResult
FileId
NeedsWorkshopAgreement
Result
Success
Query
All
AllGuides
Artwork
Collections
ControllerBindings
GameManagedItems
IntegratedGuides
Items
ItemsMtx
ItemsReadyToUse
Screenshots
UsableInGame
Videos
WebGuides
AddRequiredKeyValueTag
AllowCachedResponse
CreatedByFollowedUsers
CreatedByFriends
FavoritedByFriends
GetPageAsync
InLanguage
MatchAllTags
MatchAnyTag
NotYetRated
RankedByAcceptanceDate
RankedByAveragePlaytimeTrend
RankedByLifetimeAveragePlaytime
RankedByLifetimePlaytimeSessions
RankedByNumTimesReported
RankedByPlaytimeSessionsTrend
RankedByPlaytimeTrend
RankedByPublicationDate
RankedByTextSearch
RankedByTotalPlaytime
RankedByTotalUniqueSubscriptions
RankedByTotalVotesAsc
RankedByTrend
RankedByVote
RankedByVotesUp
SortByCreationDate
SortByCreationDateAsc
SortByModeration
SortBySubscriptionDate
SortByTitleAsc
SortByUpdateDate
SortByVoteScore
WhereSearchText
WhereUserFavorited
WhereUserFollowed
WhereUserPublished
WhereUserSubscribed
WhereUserUsedOrPlayed
WhereUserVotedDown
WhereUserVotedOn
WhereUserVotedUp
WhereUserWillVoteLater
WithAdditionalPreviews
WithChildren
WithFileId
WithKeyValueTag
WithLongDescription
WithMetadata
WithOnlyIDs
WithoutTag
WithPlaytimeStats
WithTag
WithTotalOnly
WithTrendDays
WithType
ResultPage
CachedData
ResultCount
TotalCount
Entries
Dispose
UserItemVote
VotedDown
VotedUp
VoteSkipped
Utility
FormatPrice
Int32ToIp
IpToInt32
ReadNullTerminatedUTF8String
SteamClass
SteamClientClass
SteamServerClass
SteamSharedClass
Enums
30
AuthResponse
BeginAuthResult
BroadcastUploadResult
CallbackType
CheckFileSignature
ConnectionState
DurationControlProgress
FriendState
GamepadTextInputLineMode
GamepadTextInputMode
InputSourceMode
InputType
LeaderboardDisplay
LeaderboardSort
MusicStatus
NetConnectionEnd
NetDebugOutput
NotificationPosition
P2PSend
P2PSessionError
ParentalFeature
Relationship
Result
RoomEnter
SendType
SteamDeviceFormFactor
SteamNetworkingAvailability
UgcType
Universe
UserHasLicenseForAppResult
Code Snippets
General
4
Debugging
Get Your SteamId
Leaderboards
Take a screenshot
Friends
1
Grouping Friends
Inventory
1
Item Store Cart
Servers
1
Get Server List
Workshop
3
Creating Workshop Items
Editing Workshop Items
Listing Workshop Items
Stats & Achievements
4
Achievement Unlocked
Get a Stat Value
Set a Stat Value
Wiping Your Stats
Networking
2
Creating A Socket Server
P2P Networking
Unity Specific
1
Getting A Client's Avatar