Closed david-rhodes closed 7 years ago
Tried WebClient
and it worked.
@BergWerkGIS Have that class somewhere? I want to use this in the SDK for the Geocode
attribute.
Sorry, no class, just put a quick test field into SlippyEditor.cs
.
And called out to something like
using(WebClient wc = new WebClient()){
resultTestField.StringValue = wc.DownloadString("http://www.mapbox.com").Substring(10);
}
One annoyance I noticed: OnInspectorGUI()
seems to fire quite often, after each key press.
For geocoding we might want to add a delay there, eg only send request after there has been no key press for at least 500ms.
Linked.
This would only need to work in the editor. Unity does not support coroutines at edit time, so
UnityWebRequest
andWWW
both fail for the purposes of writing editor tools (geocoding, for example).@BergWerkGIS I know you said you tested
System.web
but it didn't work on mobile. Does it work in the editor?