it is an android app.
i wantto do a level select menu with files in directory. if we had 10 files it creates 12 level select items (2 tutorial) it is working on pc. but not working in phone.screen is empty. also none of them created in phone. what is the problem. i can not see
public class menuload : MonoBehaviour {
public List<GameObject> menuitem= new List<GameObject>();
public int menulength;
public GameObject menuprefab;
void Start () {
DirectoryInfo dir= new DirectoryInfo(Application.streamingAssetsPath + "/levels");
int i=2 ;
var info = dir.GetFiles ();
foreach (FileInfo fi in info)
{
if (fi.Extension.Contains("lvl"))
{
i++;
}
}
menulength = i;
for(int y=0 ; y<menulength;y++ )
{
GameObject g = Instantiate (menuprefab,new Vector3(0,y,0) ,Quaternion .identity ) as GameObject ;
menuitem.Add (g);
}
}
// Update is called once per frame
void Update () {
}
}