I want to import .obj file from a server on run time in unity3D, read lot of questions/answers but not able to find a suitable solution. Using WWW in unity I am able to get .png file and store it in local repository but this thing not works for .obj file. Following is the code I used to get image from server
public string url = "http://images.earthcam.com/ec_metros/ourcams/fridays.jpg";
IEnumerator Start() {
WWW www = new WWW(url);
while (!www.isDone)
yield return www;
if (www.isDone)
Debug.LogError ("Done");
File.WriteAllBytes("C:\\Users\\Admin\\Downloads\\conan\\test1.jpg", www.bytes);
}
ans similarly I tried to get .obj file but it not works test .obj file created but without any data
public string url = "https://drive.google.com/open?id=0B5_UUyYa_2XdZUpuNlE4Z3pqWUk";
IEnumerator Start() {
WWW www = new WWW(url);
while (!www.isDone)
yield return www;
if (www.isDone)
Debug.LogError ("Done");
File.WriteAllBytes("C:\\Users\\Admin\\Downloads\\conan\\test.obj", www.bytes);
}
Kindly give me help in this regard.