- Home /
www stream load data error
I keep getting the 'You are trying to load data from a www stream which had the following error when downloading. Could not resolve host: .......; No data record of requested type How do I get away from that error? Here is the code:
var textMsg : TextMesh;
var foldernum : int;
var ProcessBoxS : GameObject;
var ProcessBoxM : GameObject;
var path = "Game Video";
var arr = new Array ();//
var VideoCube : GameObject;
private var BoxChange : boolean;
private var arraycount:int = 0;
function Start () {
BoxChange=false;
ProcessBoxS.transform.position.y=0;
}
function PlayVideo () {
var info = new DirectoryInfo(path);//
var fileInfo = info.GetFiles();//
for (file in fileInfo) //
{
url = file.ToString();
var myNewURL = System.IO.Directory.GetCurrentDirectory()+ "\\" + path;
//var myNewURL = "file://" + url.Replace("\\", "/");
arr.Push (myNewURL);
} //
for (var i=0;i<arr.length;i++) { //
var www : WWW = new WWW(arr[i]);
yield www;
VideoCube.renderer.material.mainTexture = www.texture;
if (i==arraycount-1) {
i=0;
}
}
}
function Update () {
arraycount = arr.length;
if (ProcessBoxM.transform.position.y==2) {
if (BoxChange==false) {
BoxChange=true;
PlayVideo();
}
}
if (foldernum==0) {
path = "Game Video";
} else {
path = "Game Video" + foldernum;
}
path = System.IO.Directory.GetCurrentDirectory()+ "\\" + path;
}
Note: This code sees through the Game Folders (There is Game Folder, Game Folder1, Game Folder2 etc..) then it extracts all the pictures from that certain Game Folder and projects all the pictures on a cube in a video. The GameFolders are stored in the folder where there is the Game Exe and Data file. This is a PC game, not via Web. Thanks. ![alt text][1] [1]: /storage/temp/20315-1.png
1.png
(7.8 kB)
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613125724im_/https://answers.unity.com/themes/thub/images/avi.jpg)