Quantcast
Channel: Questions in topic: "loops"
Viewing all articles
Browse latest Browse all 184

Change array components through loops with 4.6 gui

$
0
0
I have a level select with 50 levels, each of them have 3 stars (sprites) which can be activated, I have put all of the levels (images) in an array and would like to unlock them and give them their stars activated with 2 bools that use unity's playerprefs, which are: LevelStars + level LevelS1 for example holds an int between 0 and 3. and I have LevelC + level. Which holds an int from 0 to 1 on the condition on the level if it's completed or not, disabling the button or not. I can't really seem to figure out correctly how to do it so some help to get me going would be greatly appreciated, I previously did this with the old unity gui system using this code: if(PlayerPrefs.GetInt("LevelC"+i.ToString()) == 1){ int levelStars = PlayerPrefs.GetInt("LevelS"+i); for(int j=0; j

Viewing all articles
Browse latest Browse all 184

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>