Search code examples
c#windowsunity-game-enginesteamsteamworks-api

How to get steamID from Steamworks API in Unity3D in C#?


I'm coding a game in C# in unity3d. I installed the Steamworks API, and now I see that a lot of things like getPersonaName() and avatar need SteamID to fetch them. I want to know how, even if it's the briefest of explanation, just point me in the right direction.

P.s: on their support page is a link to documentation. In that documentation are the examples for getting your name and names of your "friends", but the examples use CSteamID variable, which declaration is unknown.


Solution

  • You should be able to call:

    SteamUser.GetSteamID();