Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Unity Scripting

You're reading from   Mastering Unity Scripting Learn advanced C# tips and techniques to make professional-grade games with Unity

Arrow left icon
Product type Paperback
Published in Jan 2015
Publisher
ISBN-13 9781784390655
Length 380 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Alan Thorn Alan Thorn
Author Profile Icon Alan Thorn
Alan Thorn
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Unity C# Refresher FREE CHAPTER 2. Debugging 3. Singletons, Statics, GameObjects, and the World 4. Event-driven Programming 5. Cameras, Rendering, and Scenes 6. Working with Mono 7. Artificial Intelligence 8. Customizing the Unity Editor 9. Working with Textures, Models, and 2D 10. Source Control and Other Tips Index

What this book covers

Chapter 1, Unity C# Refresher, summarizes in very brief terms the basics of C# and scripting in Unity. It's not intended as a complete or comprehensive guide to the basics. Rather, it's intended as a refresher course for those who've previously studied the basics, but perhaps haven't scripted for a while and who'd appreciate a quick recap before getting started with the later chapters. If you're comfortable with the basics of scripting (such as classes, inheritance, properties, and polymorphism), then you can probably skip this chapter.

Chapter 2, Debugging, explores debugging in depth. Being able to write solid and effective code depends partially on your ability to find and successfully fix errors as and when they occur. This makes debugging is critical skill. This chapter will not only look at the basics, but will go deeper into debugging through the MonoDevelop interface, as well as establish a useful error-logging system.

Chapter 3, Singletons, Statics, GameObjects, and the World, explores a wide range of features for accessing, changing, and managing game objects. Specifically, we'll see the singleton design pattern for building global and persistent objects, as well as many other techniques for searching, listing, sorting, and arranging objects. Scripting in Unity relies on manipulating objects in a unified game world, or coordinate space to achieve believable results.

Chapter 4, Event-driven Programming, considers event-driven programming as an important route to re-conceiving the architecture of your game for optimization. By transferring heavy workloads from update and frequent events into an event-driven system, we'll free up lots of valuable processing time for achieving other tasks.

Chapter 5, Cameras, Rendering, and Scenes, dives deep into seeing how cameras work, not just superficially, but how we can dig into their architecture and customize their rendered output. We'll explore frustum testing, culling issues, line of sight, orthographic projection, depth and layers, postprocess effects, and more.

Chapter 6, Working with Mono, surveys the vast Mono library and some of its most useful classes, from dictionaries, lists, and stacks, to other features and concepts, such as strings, regular expressions and Linq. By the end of this chapter, you'll be better positioned to work with large quantities of data quickly and effectively.

Chapter 7, Artificial Intelligence, manages to apply pretty much everything covered previously in one single example project that considers Artificial Intelligence: creating a clever enemy that performs a range of behaviors, from wandering, chasing, patrolling, attacking, fleeing and searching for health-power ups. In creating this character, we'll cover line-of-sight issues, proximity detection, and pathfinding.

Chapter 8, Customizing the Unity Editor, focuses on the Unity Editor, which is feature filled in many respects, but sometimes you need or want it to do more. This chapter examines how to create editor classes for customizing the editor itself, to behave differently and work better. We'll create customized inspector properties, and even a fully functional localization system for switching your game seamlessly across multiple languages.

Chapter 9, Working with Textures, Models, and 2D, explores many things you can do with 2D elements, such as sprites, textures, and GUI elements. Even for 3D games, 2D elements play an important role, and here we'll look at a range of 2D problems and also explore effective and powerful solutions.

Chapter 10, Source Control and Other Tips, closes the book on a general note. It considers a wide range of miscellaneous tips and tricks (useful concepts and applications) that don't fit into any specific category but are critically important when taken as a whole. We'll see good coding practices, tips for writing clear code, data serialization, source and version control integration, and more.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime