- Home /
Get account user name
How would I be able to access an account user name from a site when I log in to the site and launch my game?
For example, I make an account on a site with the user name "guy". I log into that account, Play a unity game on that site, and it displays "guy" as my name in the game. How would I do this?
If you consider the question answered, you should accept any of the answers you deem correct by clicking the checkmark.
Answer by Peter G · Jul 25, 2011 at 08:12 PM
Most of that will probably happen from outside the Unity engine. You will need a database of all your users. From there, you could do a number of things based on what you think is the best for your individual situation.
You can have the user log into your website (not the game at first). Then pass that information to the web player when the time is right. Something like this page.
You could also have your user log directly into your web player. For this, you would probably want to upload the database (or parts of it) using WWW then do log ins fro that.
Answer by almo · Jul 25, 2011 at 08:04 PM
Sounds like you need to use MySQL/php to create the site where the accounts are created and stored, and you'd query a php page connected to that database from Unity to have users log in while playing.
This is not a trivial thing to set up, and you won't get a copy/paste answer to that question here at Unity Answers.
Sorry I just didn't really understand what you said so I can't say it was correct.
It's ok with me. That's why I said "whichever you deem correct." :)
Your answer
Follow this Question
Related Questions
How to claim a legacy account if you can't remember the old email? 0 Answers
can't get past "Updating License" 0 Answers
Change E-Mail 1 Answer
how to solve double acount bug 0 Answers
How do you make a password script in c#? 0 Answers