Search Unity

  1. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

Help Wanted 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.
     
unityunity