I'm building an app in unity (5.4.0f3) for the Windows Store platform (Universal 10 SDK). I'll be running it on hololens.
I am having an issue compiling my scripts and it appears to be due to the WebClient class that I am using. I tried also using HttpClient as recommended in another post but no luck. I have seen some people successfully build using the WebClient class in Unity but I guess they didn't build for the Windows Store.
The compile errors I am getting: error CS0246: The type or namespace name 'WebClient' could not be found (are you missing a using directive or an assembly reference?) The name 'webClient' does not exist in the current context
I have just started working with Unity but I believed that I could add a few directives around the code that uses the WebClient or declares a new WebClient so that it would still compile and be able to run on the hololens.
I found the "Platform dependent Compilation" page (https://docs.unity3d.com/Manual/PlatformDependentCompilation.html) which seemed to explain this.
I tried using a few of them (for example UNITY_WSA, UNITY_WSA_10_0 etc,) but no luck. I'm using the yahoo finance API currently in the following manner: webClient.DownloadFile(url, stockFile);
which downloads a .csv
file.
Any suggestions?