So I've been working on a game and started building it in Xcode to test on my phone and I've found there is a massive bug occurring. I've tracked down what is breaking up but no idea what is causing it as it works fine in the unity player.
So I'm spawning objects at random heights and then increasing that value for the next one using this line
spawnHeight += Random.Range (minSpawn, maxSpawn);
This is the line that is not working as when I run it on my phone I get everything spawning at the exact same height, but within Unity they spread out no problem.
I also tested it by adding a check where I store the value of spawnHeight before increasing it, and then surrounding that section of a code to only run if the 2 values weren't equal, and sure enough only 1 object spawns at the correct height. I also did this similarly by creating an infinite loop and not allowing the function to progress at all until the 2 values weren't equal and it crashes the game (as expected).
Once again, these two tests don't cause any issues within the unity player, but the iOS build with the code in place causes issues
Anyone have any idea why the spawnHeight is not being increased on iOS? Thanks
↧