Unity 3.x Scripting

Write efficient, reusable scripts to build custom characters, game environments, and control enemy AI in your Unity game with this book and ebook.
Preview in Mapt

Unity 3.x Scripting

Volodymyr Gerasimov, Devon Kraczla

Write efficient, reusable scripts to build custom characters, game environments, and control enemy AI in your Unity game with this book and ebook.
Mapt Subscription
FREE
$29.99/m after trial
eBook
$16.80
RRP $23.99
Save 29%
Print + eBook
$39.99
RRP $39.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$16.80
$39.99
$29.99p/m after trial
RRP $23.99
RRP $39.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


Unity 3.x Scripting Book Cover
Unity 3.x Scripting
$ 23.99
$ 16.80
Unity 3.x Game Development Essentials Book Cover
Unity 3.x Game Development Essentials
$ 29.99
$ 21.00
Buy 2 for $34.30
Save $19.68
Add to Cart
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 

Book Details

ISBN 139781849692304
Paperback292 pages

Book Description

Unity is a powerful tool for anyone who aspires to build interesting and sellable games. One of the exciting aspects of Unity is how easily it can be extended to build custom characters and game environments. Scripting is the key to accomplish all this, but it comes with a steep learning curve.

This book will teach you everything you need to know about scripting in Unity. It will take you through creating, including and tweaking scripts for achieving various tasks. Some of these tasks include controlling characters, animations, controlling objects, handling game data and enemy AI.

The book will begin by building scripts for simple tasks and continue to develop them for increasing level of difficulty. The first few chapters include scripting to build a custom game environment and creating characters and controlling them. Arranging camera views, controlling and creating animations are covered in the next set of chapters.

The book then moves on to build objects, animate them and code character interaction with them and create inventories where the characters can pick ammo, health and other such objects. Towards the end, the book teaches how to add background sound and discusses basic enemy AI scripting.

Table of Contents

Chapter 1: Diving into Scripting
Downloading and installing assets for this book
Getting started with the game
Available Character Controllers
Interactive objects
Dynamic objects
Summary
Chapter 2: Custom Character Controller
Creating a controllable character
Custom Character Controller
Cameras
Animation controls
Summary
Chapter 3: Action Game Essentials
Programming weapons and pickables
Advanced animation system
Weapon pickup
Adding ammo and health pickups
Creating a treasure chest
Applying projectile fixes
Tethering and soft body
Summary
Chapter 4: Drag-and-Drop Inventory
GUI basics
Drag-and-drop inventory
Character customization
Summary
Chapter 5: Dynamic GUI
Radial health display
Creating items
Creating armor
Creating the weapons
Scripting and displaying the score system
Displaying the objectives
Creating the targeting system
Summary
Chapter 6: Game Master Controller
Game manager theory
Creating game managers
GameLoader
Dynamic camera
Audio
Audio manager
Summary
Chapter 7: Introduction to AI Pathfinding and Behaviors
Simple waypoint pathfinding
Enemy statistics, shooting, and behaviors
Returning to the aiSimplePath script
The bulletCollision, ammoCollision, and AmmoInfo scripts
Summary

What You Will Learn

  • Use available scripts that readers can use to create default character controller
  • Attach default character controller scripts to an existing game object
  • Set-up your own camera and character controller rigs through code
  • Code dynamic and static objects like bio gun, ammo, health, character stat augmentation, treasure chests and make your character interact with them
  • Create character item slots along with inventories, where players will be able to drag and drop different item icons in the inventory slots
  • Attach existing animation scripts to characters and objects and create new ones
  • Assign and equip selected items on a player or object, making them active and useable like adding fire functionality to a bio gun
  • Create and maintain scores to control character objectives and save game data
  • Setup a system to control transition between scenes and transferring objects from one scene to another along with instantiation for characters
  • Deal with 2D and 3D parallax backgrounds
  • Create an audio game controller to fix sound overlapping and create background audio stems
  • Basics of enemy AI, such as path-finding and creating distinct enemy behavior and their awareness

 

Authors

Table of Contents

Chapter 1: Diving into Scripting
Downloading and installing assets for this book
Getting started with the game
Available Character Controllers
Interactive objects
Dynamic objects
Summary
Chapter 2: Custom Character Controller
Creating a controllable character
Custom Character Controller
Cameras
Animation controls
Summary
Chapter 3: Action Game Essentials
Programming weapons and pickables
Advanced animation system
Weapon pickup
Adding ammo and health pickups
Creating a treasure chest
Applying projectile fixes
Tethering and soft body
Summary
Chapter 4: Drag-and-Drop Inventory
GUI basics
Drag-and-drop inventory
Character customization
Summary
Chapter 5: Dynamic GUI
Radial health display
Creating items
Creating armor
Creating the weapons
Scripting and displaying the score system
Displaying the objectives
Creating the targeting system
Summary
Chapter 6: Game Master Controller
Game manager theory
Creating game managers
GameLoader
Dynamic camera
Audio
Audio manager
Summary
Chapter 7: Introduction to AI Pathfinding and Behaviors
Simple waypoint pathfinding
Enemy statistics, shooting, and behaviors
Returning to the aiSimplePath script
The bulletCollision, ammoCollision, and AmmoInfo scripts
Summary

Book Details

ISBN 139781849692304
Paperback292 pages
Read More

Read More Reviews

Recommended for You

Unity 4.x Cookbook Book Cover
Unity 4.x Cookbook
$ 29.99
$ 21.00
Unity 4.x Game AI Programming Book Cover
Unity 4.x Game AI Programming
$ 26.99
$ 18.90
Unity Shaders and Effects Cookbook Book Cover
Unity Shaders and Effects Cookbook
$ 29.99
$ 6.00
Unity Character Animation with Mecanim Book Cover
Unity Character Animation with Mecanim
$ 39.99
$ 28.00
Learning C# by Developing Games with Unity 3D Beginner's Guide Book Cover
Learning C# by Developing Games with Unity 3D Beginner's Guide
$ 29.99
$ 21.00
Unity 3.x Game Development Essentials Book Cover
Unity 3.x Game Development Essentials
$ 29.99
$ 21.00