- Home /
Question by
sasantv · Jul 20, 2016 at 08:55 PM ·
iosiphonewwwwww.texturewww.loadimageintotexture
WWW not working to load image on iOS from google static maps.
I am trying to load google static map as a texture to a plane in Unity 5.2, and well I can't! The following code works in the editor and OSX but loads the "?" texture in iOS. I tried solutions suggested for ATC here: https://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ and it didn't work. below is my code:
private string url = "https://maps.googleapis.com/maps/api/staticmap?center=34.014717,%20-118.418414&zoom=15&size=640x640&scale=2&maptype=roadmap";
IEnumerator Start() {
// Start a download of the given URL
WWW www = new WWW(url);
// Wait for download to complete
yield return www;
// assign texture
Renderer renderer = GetComponent<Renderer>();
renderer.material.mainTexture = www.textureNonReadable;
}
Comment
Your answer
Follow this Question
Related Questions
WWW error on ios 1 Answer
Load image from document directory for iphone 1 Answer
WWW in iOS does not set user agent header 1 Answer
Memory leak with WWW on iOS 1 Answer
Download then open image on IOS 0 Answers