The Update function in MonoBehaviour is where you’ll end up running a lot of you game code. However, it’s always worth asking yourself does the code need to be running every frame? Some parts you can get away with running a few times a second or event every few seconds. Every time you’re building something into Update, understand if this is where it must be.
Level of detail code is a very obvious one that you might only want to update every second or so. I’ll usually run InvokeRepeating for that.
If you’re switching between projects or planning to create a new one when starting Unity, it can take a while for it to warm up and allow you to do this. One way to open another project is to find a scene in that project and open Unity from that. Of course that’s not as quick as clicking on the Unity icon on your desktop (you do have a shortcut on your desktop right???) as you have to find a scene buried within the needed project.
If you press and hold Alt when you open Unity it will open the projects dialog instead of the last opened project. here you can select a different project or create a new one!
The first thing you need to do on a new project with modelers is to agree on a scale. This is especially important if there are multiple modelers on the project, you don’t want them all producing content at different scales! The best way to determine scale is to ask each modeler to produce a one unit cube as they see it. Bring the cube into Unity and compare it to the primitive Unity uses (Menu > GameObject > Create Other > Cube). The Unity cube is one unit squared and one unit is one meter.
Why is it important that we stick to Unity unit = 1 meter? For starters, it just makes sense right? When you code anything in your game, it’s easy to move something 1m/s.
Also, if there is any physics in your game, you’re going to need to stick to this concept. The physics simulation is based on 1 unit = 1 meter and any other scale is going to give you a physically weird world. Things will fall too quick or slow.
There’s going to be a point when you crash Unity or your built game. It might just be an instability issue, it might be a loop in your code that can go awry. Sometimes you have no idea and that’s when you need to dig through the log files.
All the information you need is on this page to find them.
The quickest way to the editor log is to use the button located top right in the Unity console window. You can also find things like build size breakdowns after you have built your project. It makes tracking down inappropriately massive assets in your build easy.
Log files also contain all your Debug.Log outputs which can be very useful if you’ve compiled and built your game and it’s now crashing on another machine.