The file exists at, StringSplitOptions.None) I suspect this has to do with how you're trying to read your text file. Loads the image associated with "flagName".įlagImage.GetComponent().sprite = sprite ĭoes anyone have any ideas why the games stops working when it is run on the phone and how this can be fixed?ĭisclaimer: I don't have an Android test setup at present, so the following is speculation. Gets the sprite of the flag called "flagName". Int flagArrayPosition = Random.Range(0, 195) Randomly gets the file name of a flag. Nothing of this has resolved the problem. So far I've tried relaunching Unity, re-importing all assets, and recreating the game in a new project. However, when I build and run the game on my Android phone only the placeholder flag is displayed and never a randomly chosen one. each time the game is started a random flag is displayed). When I play the game in Unity everything works as expected (i.e. This class file is currently the only class file there is. Right now, all the game does is to randomly load one of 196 flags upon startup (view: or code below). I am using Unity to program a simple Android game in C#.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |