- Home /
get user account name
Hi,
I'm about to publish a little game for multiple players on one mac. Users will have to enter their names and I thought it'd be cool if the default name for user 0 would be the username of the user currently logged in.
Is there a way to get it in unity?
Answer by dannyskim · Feb 25, 2012 at 08:40 PM
I believe Environment.Username should work. If not, there are a couple of other methods I can dig up. Try that first.
You have to use the System reference at the top of your script for you to be able to access this class.
I keep forgetting that I can use all that .net stuff as well :D
Your answer
Follow this Question
Related Questions
How do you make a password script in c#? 0 Answers
How Can i store string variable through UI text that is confirmed by a button ? 0 Answers
,How to get Network details of holoLens? 0 Answers
Change E-Mail 1 Answer
Multiplayer Usernames c# 1 Answer