Unity how to get the players microsoft username

Viewed 64
1 Answers

This should work in C#:

string userName = Environment.UserName;

Or this:

string userName = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
Related