Scripting in Unity is a large part of what goes into making a game. As this title has shown, there are some good ways to script and some not so good ones. In this section, you will find several resources that extend what has already been shown and offer you more places to look and learn from.
The editor is by far the most underutilized feature of Unity, partly because while building your game, you focus on what goes into it, and partly because the documents surrounding the editor are quite sparse.
However, many a brave soul has ventured into this domain and extracted the secret sauce. I've shown you the basics, so continue on to more advance uses of this hidden tool by going through the following links:
An interesting article by Mana Break walks through the process of transforming the Unity editor into your own level-creation system, which is well worth a read. It is available at http://mana-break.blogspot.co.uk/2013/12/howto-use-unity3d-as-level-editor-for.html.
A good friend of mine, Jamie Hales (of Pixelballon), gave a talk in the UK on extending the editor, and he was kind enough to share it. He provided a lot of information to the audience about interesting tricks to extend the editor (even adding context menus). You can view the deck for the presentation and the associated code at the following links:
http://t.co/VaiQjjFLHg (PowerPoint)
https://t.co/AiNj2XVSVm (sample code)
Catlike Coding has an awesome array of Unity articles with very interesting results. I checked out the rest of the articles, but there was one in particular that highlighted some great use of editor features for asset editing in the scene. Visit http://catlikecoding.com/unity/tutorials/editor/star/ to read more about this article.
AI is a tricky subject at best; the following are a few extra tips and tricks for Unity on how to build on the AI elements in this title:
There is a great article on the use of NavMesh in Unity, valid for both 2D and 3D, at http://blackwindgames.com/blog/pathfinding-and-local-avoidance-for-rts-rpg-game-with-unity/.
UnityGems.com is a wealth of content for Unity developers, like the beginner's tutorial to develop a character AI, which is available at http://unitygems.com/basic-ai-character/.
AI Gamedev is one of the biggest sites for AI in game development. Its resources reach far and wide. Some content is free, but for most, there is a subscription fee. You can visit http://aigamedev.com/ for more information.
Procedural generation is a passion of mine; I wished there had been enough pages to do justice to it in this title. If you are looking to get into this fascinating subject, the following are some really handy and practical places to look:
First and foremost is the Procedural Content Generation Wiki, not really about wiki but procedural generation's techniques and guidance. It is a great place to refer to when you're curious or stuck. Visit http://pcg.wikidot.com/ for more information.
Another fascinating post on the Catlike Coding blog shows an implementation to generate procedural worlds using fractals. You can see the post at http://catlikecoding.com/unity/tutorials/constructing-a-fractal/.
At tutsplus.com, they have a wide array of game development tutorials in lots of frameworks/platforms and languages. One such article is on procedurally modifying game assets. Check it out and the rest of the site at http://gamedevelopment.tutsplus.com/tutorials/how-to-procedurally-customize-your-unity-game-assets-with-code--gamedev-12324.
As mentioned earlier in Chapter 6, The Big Wild World, if you want some fascinating procedurally generated maps for your game, check out http://donjon.bin.sh/fantasy/world/.
Coding doesn't need to be hard. The following are a few helpful sites to keep you moving:
Coding Jar has a number of advanced coding-style posts and tutorials. There is one such tutorial that particularly stands out to deal with Advanced Serialization, which is well worth a look. It is available at http://www.codingjargames.com/blog/2012/11/30/advanced-unity-serialization/.
We discussed messaging and other systems in this title, so it's worth checking out SignalChain, which is a much improved messaging engine for Unity. You can visit https://github.com/sebas77/SignalChain for more information.
IOC and dependency injection is a particularly interesting and advanced topic that can simplify your project immensely (however at a cost of increased technical understanding). If you feel so inclined, you can check out the full free implementation written specifically for Unity at https://github.com/strangeioc/strangeioc.
Another view on abstraction and interfaces can be found on the blog (not for the faint hearted) at http://victorbarcelo.net/using-abstractions-interfaces-unity3d/?goback=%2Egde_3383466_member_5818738285761015811#%21.
The following sites simply have large collections of scripts that you can freely use and learn from. Some have already been mentioned in this title, but it is worth calling them out here specifically:
One of the best collections of scripts in one powerful library is maintained by a former XNA developer, Nick Gravelyn. UnityToolbag is chock-full of tried and tested scripts that are essential for any Unity developer. You can visit https://github.com/nickgravelyn/UnityToolbag for more scripts.
I've mentioned Unity wiki on several occasions in this title—always keep its location close at hand. The script also has a wealth of information on other aspects of Unity. It's community-driven, so keep that in mind. The scripts wiki is available at http://wiki.unity3d.com/index.php/Scripts.
Game produce a lot of valuable resources; at one a Free Achievement Framework for Unity was born. It is worth reading and looking into. Visit http://www.stevegargolinski.com/progress-a-free-achievement-framework-for-unity/ for more information.