External tips

The following tips and tricks relate to topics outside the Unity Editor itself that can help Unity development workflow enormously.

Googling Unity-related problems or concerns can go a lot faster if we start the search with "site:unity3d.com".

If the Unity Editor crashes, for whatever reason, then we can potentially restore our Scene by renaming the following file to include the .unity extension (for Scene files), and copying it into our Assets folder:

<project folder>Temp\_EditModeScene

If we're developing on Windows, then there's very little reason not to use Visual Studio at this point. MonoDevelop has been dragged along kicking and screaming for many years, and many developers have been switching over to the more feature-rich Visual Studio Community edition for most of their development workflow needs, particularly with incredibly helpful plugins such as Resharper.

For some developers, the only reason to boot up MonoDevelop has been for runtime debugging of code, but with the recent release of Visual Studio Tools for Unity (VSTU), Visual Studio now offers better integration with the Unity Editor. It even allows our C# code to be runtime-debugged through Visual Studio itself. Unless we have particular hangups about the interface or the fact that it's made by the big, bad Microsoft, we should want to give Visual Studio Community a try as it accelerate our script code development in ways we hadn't expected.

Check out the following video for more information on Visual Studio and its integration with Unity through VSTU:

https://channel9.msdn.com/Events/Visual-Studio/Visual-Studio-2015-Final-Release-Event/Building-Unity-games-in-Visual-Studio

There is a great resource for game programming patterns (or rather, typical programming patterns explained in a way that is pertinent to game development) and it is completely free and available online:

http://gameprogrammingpatterns.com/contents.html

Keep an eye on any session videos that come from Unite conferences, whenever they happen (or better yet, try to attend them). There's usually a couple of panels at each conference held by experienced developers sharing lots of cool and interesting things they've been able to accomplish with the Engine and Editor. In addition to this, make sure to keep involved in the Unity community, either through the forums on unity3d.com, Twitter, reddit, Stack Overflow and Unity Answers, or at whatever social gathering places pop out of the woodwork in the coming years.

Every single tip that was included in this book started out as an idea or tidbit of knowledge that someone shared somewhere at some point. So, the best way to keep up-to-date on the best tips, tricks, and techniques is to keep our fingers on the pulse of where Unity is heading by staying involved in its community.

Other tips

Finally, the following section contains tips that didn't quite fit into other categories.

It's always a good idea to organize our Scenes using empty GameObjects and name them something sensible. The only drawback to this method is that the empty object's Transform is included during position or rotation changes and gets included during recalculations. Proper object referencing, Transform change caching, and/or use of localPosition/localRotation solves the problem adequately. In almost all cases, the benefits to workflow from Scene organization are significantly more valuable than such trivial performance losses.

Animator Override Controllers were introduced way back in Unity v4.3, but tend to be forgotten or rarely mentioned. They are an alternative to standard Animation Controllers that allow us to reference an existing Animation Controller, and then override specific states to use different animation files. This allows for much faster workflows since we don't need to duplicate and tweak Animation Controllers multiple times; we only need to change a handful of animation states.

When Unity 5 is launched, it automatically opens the Project Wizard, allowing us to open a recent project. However, if we prefer the default behavior from Unity 4, which is to automatically open the previous project, we can edit this behavior by navigating to Edit | Preferences | General | Load Previous Project on startup. Note that this setting has a different name under Unity 4 and works in the opposite fashion. You can see this by navigating to Edit | Preferences | General | Always Show Project Wizard. Note that if the Project Wizard is enabled, we can also open multiple instances of Unity Editor simultaneously.

The amazing customizability of the Unity Editor and its ever-growing feature set means there are absolutely tons of little opportunities to improve workflows and more are being discovered or invented every single day. The Asset Store marketplace is absolutely rife with assets, which try to solve some kind of problem that modern developers are having trouble with, which makes it a great place to browse if we're looking for ideas or, if we're willing, drop some money to save us a ton of hassle. Because these assets tend to sell to a broad audience, this tends to keep prices low, and we can pick up some amazingly useful tools and scripts for surprisingly little cost. In almost all cases, it would take us a significant number of hours to develop the same solution ourselves. If we consider our time as valuable, then scanning the Asset Store on occasion can be a very cost-effective approach to development.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.183.210