Here is the code:
void Start (){
yield return new WaitForSeconds(0.5f);
int tries=0;
while(tries<=10){
if(hostData && hostData.length>0){
//Waiting for hostData
}else{
FetchHostList(true);
}
yield return new WaitForSeconds(0.5f);
tries++;
}
}
P.S. Unity said "target.Start()" can't be an iterator.