I’m working through the Unity Survival Shooter Tutorial 2 of 10
At 27:26 it’s pointed out that there needs to be a bracket in a certain place. This is literally the first time I’ve written C# code and I don’t have that bracket and I can’t just add another one?
Is there a way I can repair the code so that I can continue with the demo? I’ve just been adding brackets like they’re any other letter or number, are they supposed to be spawned somehow when I add the text, and can the code be repaired so that I can move forward with it?
Can I copy and paste text blocks and edit them or does it need to be hand coded from scratch? I’ve no experience of the formatting.
Also, can someone recommend a good basic introductory C# tutorial that covers/covers how to spawn/add the brackets in the correct way?
When you code, you should use an IDE (Visual Studio or MonoDev for Unity).
With it, when you will open a bracket, the IDE will indent your code and “should” put another bracket to close your function / class.
In your video, the guy says you need the bracket at line 40 to close the class (I don’t know the name, I didn’t watch the entire video). It should be something like that:
Thanks, I’ll take it from the top and pay attention to when the brackets appear. If you can’t just add the brackets as you go then all of the code I’ve written is probably incorrect.