Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by SomeGuy22 · Jul 26, 2012 at 08:34 PM · playerprefsstringsteamloginusername

How to get Steam Username?

I know very few Unity games have actually made it to Steam, but I'm planning for mine to be one of the few. However, I've come across a problem. (I've gotten no help from Unity Forums)

How do I retrieve the Steam username of the player and put it into a string variable? Is this value stored somewhere on your computer? Or can it be retrieved from a Steam website location?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by chrisjjones · Aug 03, 2012 at 07:32 PM

You could possibly use this C# wrapper for the SteamWeb API:

https://github.com/Overv/SteamWebAPI/

If you're looking for the Steam username of the current player, I would imagine you would need to hook into the SteamWorks SDK in some way. I'm not sure if there is a C# wrapper for that but I do know that several XNA games have made it to Steam. It might be worth searching around on some of the XNA specific forums as I assume the Unity solution would be similar.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image SomeGuy22 · Aug 04, 2012 at 12:25 AM 0
Share

Thanks, but do you know how to apply this to Unity? Do you have to put this in a Unity Project folder or something?

avatar image chrisjjones · Aug 04, 2012 at 02:07 PM 0
Share

You will need to build the S$$anonymous$$mWebApi library and drop the created DLL into the Plugins folder of your Unity project. Then just add

Using S$$anonymous$$mAPI;

to the top of any class you want to access the library from.

Also, make sure to build the library for .NET 3.5 Client or it won't work in Unity. In order to get it to build I had to change request.Host = "api.s$$anonymous$$mpowered.com:443" to request.Headers.Set(HttpRequestHeader.Host, "api.s$$anonymous$$mpowered.com:443") in their source.

I believe using Plugins requires Unity Pro, so that is another caveat to be aware of...

avatar image SomeGuy22 · Aug 04, 2012 at 02:11 PM 0
Share

Sorry, how do you build it? With what program? Thanks by the way!

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Will PlayerPrefs be efficient and allowed if the game is published on Steam? 0 Answers

PlayerPrefs for saving strings 1 Answer

How do you make a password script in c#? 0 Answers

Saving username using InputField and PlayerPrefs 1 Answer

PlayerPrefs script problem 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges