Hi at all. Strange issue happen.
I’ve implemented a small call WebRequest to Api DropBox (check here the final solution i’ve found)
Now I’m in trouble with a strange issue : I’ve declared a List . But after returning from WebRequest (it is in another Script) suddenly List.Count become = 0. I’ve checked carefully all calls, but in noways this “List” is touched… but it will lost after WebRequest. Not sure but I’m believe that I should find a “way” to keep it in memory (but don’t know how).
private void Loader()
{
// Copy a Photo List from Shared Variables
for (int i = 0; i< VideoGames_SharedVar.PhotoList.Count; i++)
{
PhotoListDropBox.Add(VideoGames_SharedVar.PhotoList*);*
-
}*
-
// Path per DropBox*
-
DropBoxImagePath = "";*
-
DropBoxLoadDone=false; *
- }*
private IEnumerator ImageParse()
-
{*
-
DropBoxFullLoad=false;*
-
// Go Thru all Images*
-
for (int i = 0; i < PhotoListDropBox.Count; i++)*
-
{ *
-
// Processing Url for WebRequest*
_ string StringArray = PhotoListDropBox*.Split(new string {“\”}, StringSplitOptions.None); _
_ DropBoxImagePath = StringArray[StringArray.Length-1];_
_ DropBoxImagePath = “/Shared Folder/” + DropBoxImagePath;*_
// Call WebRequest on another script
* WebRequestScript.PressMe();*
// Wait until loading from Webrequest is done (list count is OK)
* while (DropBoxLoadDone==false)*
* {*
* yield return null;*
* };*
* // HERE MY LIST BECAME ZERO*
* string TempString = CercaSharedURL();*
_ PhotoListDropBox = TempString;
// Above error is generated because PhotoListDropBox is null
* }
DropBoxFullLoad=true;*_