UWP alternative of some functions

464 views Asked by At

I am making an app and it's working fine in Unity editor(5.5) with C#4.But when I compile it for Hololens(UWP) it gives following compiler errors.

  1. Thread doesn't contain definition for sleep. (I am using System.Threading.Thread.Sleep(1000);)
    2 The name EnvironmentVariableTarget doesn't exist in the current context ( I am using

var currentPath = Environment.GetEnvironmentVariable("PATH", EnvironmentVariableTarget.Process); ).

So can anyone suggest me the alternative of this function in UWP.

1

There are 1 answers

3
Dave Smits On

1: Thread.sleep would block a thread. You can use await Task.Delay(1000); 2: Can't access the envoriment variables. Can you explain why you need this?