I've been having some problems getting the name display to work, turns out I just needed some curly braces in there. However now when I load my main menu the scene is skipping straight into my main level scene without the 'start' button being pressed. The scene loads for a couple of seconds then skips. This aspect of the scene was working perfectly until I input the new code, so I have a feeling I've put the new script in the wrong place.
The new code causing the problem is the part about GameObjects.
Any help would be greatly appreciated!
Of course it does. Align your brackets and you will see that your bottom most code block is just outside your if statement:
I can't tell how you want / need this code fraction to be, but it's quite obvious that's your problem. Probably you just want the Loadlevel piece just inside the if block.
answered Dec 06 '11 at 11:58 AM