Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question How to get User Name on Hololens 2

Discussion in 'AR' started by dawid1806, Sep 9, 2021.

  1. dawid1806

    dawid1806

    Joined:
    Sep 4, 2019
    Posts:
    2
    Hello,
    I'm trying to get the current User Name on Hololens 2. For Win10 and Unity 2020 I used this code:
    Code (CSharp):
    1.  string userName = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
    and it works fine but how to get this information with UWP and HL2?
    Thanks.