Unity tips for newbies
I recently created my first 2D game using Unity 3D in an attempt to learn how the program works. It's a simple 2d Platformer Sandbox level. Nothing fancy and with a lot of bugs but it was an excellent introduction into the amazing programming platform that is unity.
Anyone who has ever had an inclination to learn game development should have a go at learning Unity. It's free, It's simple to learn and best of all it focuses on game design rather than bogging you down in code. Don't get me wrong, you can still code if you want to but abstracts a lot of concepts, like state machines & handing sprites, so that you can focus on the things that make a game fun.
So whilst unity makes it easy to create games there is a number of small gotchas that seem to mess with a newbie.
1. Set a Playmode tint
Every beginner tutorial explains that when you are in playmode any changes you make will be lost when you exit playmode. A solution to this is to set a "playmode tint" so that the unity editor colour changes when you are in playmode.
To do this go to Unity Preferences > Colors > Playmode tint and pick a bright colour you can't miss. I like to pick a deep red that yells "you're going to lose your changes you idiot.
2. Save your scene over and over.
At the end of every section of a tutorial you will hear them say "...and now save your scene". After a bit of playing around with unity I found out why. Some version crash, a lot, and when it does you will loose your work.
It sort of reminds me of doing school assignments in the 90s with Microsoft word. You learnt to hit ctrl + s all the time for fear of losing your work. It's time to get back into that habit.
3. Use the Standard Assets
Unity comes with some brilliant standard assets which can really speed up your game prototyping. These include scripts which work as a good starting point for developing your own scripts.
Standard assets can be imported in Unity by going to Assets > Import Package and selecting the package you want to import.
There is a video PROTOTYPING WITH STANDARD ASSETS which is an excellent introduction to Unity.
4. Aligning the camera with the scene view
Getting the camera to look the way you want to can be extremely annoying when you first start. A simple way to do this is to line up the view you want in scene view then go to:
GameObject > Align with View
Much easier than playing with rotation.
5 Read the documentation
Unity has an excellent script reference with useful sample code.
If you are in MonoDevelop and you can click on a object or method and hit " ctrl+ ' " or "command + ' " on a mac to bring up the specific documentation about that object.
If you know of any more please post them in the comments.