Could some experienced programmer please point me in the right direction.
- Is there an editor out there that will summarise the variables on a separate document?
Thank you in advance
In these times, you don't type your variable/method names anymore - you just pick them from the list (usually what you do is type the first few characters and then hit tab). It's much faster than using an editor like Unitron and typing everything out.
Besides, if you are completely new to programming, I'd recommend learning the basics in actual programming tutorials (not Unity tutorials) because that'll give you a much better foundation in the long run. One good Unity/C# tutorial I can recommened (which covers the basics) is:
Programming with C# and Unity
Once you have a basic understanding of programming - converting that UnityScript stuff into C# is a nice warm up practice ;-)
I think the best advice I can give to beginners is a good starting structure and a naming convention... ie, don't call a position vector 'p' when you could call it 'playerPosition'. For me, I always think about how I will see things in 9-12 months time. When you are coding today you will know what is going on but when you come back in 9 months time to add functionality or fix a bug you'll be totally stumped to what is going on without a good coding structure.
That said, this comes with experience... my early projects would look horrendous now.
I also try and cut down on global variables (but i'm not sure everone would agree with that one).
I also try and not 'overlap' any GameObject variables... ie the Player Object only contains stuff that relates to that object. I mean I wouldn't process any GUI stuff or other GameObject stuff within those scripts, I'd send any data I need to the required scripts instead of having external script getting data.