Unity 2018 Cookbook
eBook - ePub

Unity 2018 Cookbook

Over 160 recipes to take your 2D and 3D game development to the next level, 3rd Edition

Matt Smith

Compartir libro
  1. 794 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Unity 2018 Cookbook

Over 160 recipes to take your 2D and 3D game development to the next level, 3rd Edition

Matt Smith

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

Develop quality game components and solve common gameplay problems with various game design patterns

Key Features

  • Become proficient at traditional 2D and 3D game development
  • Build amazing interactive interfaces with Unity's UI system
  • Develop professional games with realistic animation and graphics, materials and cameras, and AI with Unity 2018

Book Description

With the help of the Unity 2018 Cookbook, you'll discover how to make the most of the UI system and understand how to animate both 2D and 3D characters and game scene objects using Unity's Mecanim animation toolsets.

Once you've got to grips with the basics, you will familiarize yourself with shaders and Shader Graphs, followed by understanding the animation features to enhance your skills in building fantastic games. In addition to this, you will discover AI and navigation techniques for nonplayer character control and later explore Unity 2018's newly added features to improve your 2D and 3D game development skills. This book provides many Unity C# gameplay scripting techniques.

By the end of this book, you'll have gained comprehensive knowledge in game development with Unity 2018.

What you will learn

  • Get creative with Unity's shaders and learn to build your own shaders with the new Shader Graph tool
  • Create a text and image character dialog with the free Fungus Unity plugin
  • Explore new features integrated into Unity 2018, including TextMesh Pro and ProBuilder
  • Master Unity audio, including ducking, reverbing, and matching pitch to animation speeds
  • Work with the new Cinemachine and timeline to intelligently control camera movements
  • Improve ambiance through the use of lights and effects, including reflection and light probes
  • Create stylish user interfaces with the UI system, including power bars and clock displays

Who this book is for

Unity 2018 Cookbook is for you if you want to explore a wide range of Unity scripting and multimedia features and find ready-to-use solutions for many game features. This book also helps programmers explore multimedia features. It is assumed that you already know basics of Unity and have some programming knowledge of C#.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Unity 2018 Cookbook un PDF/ePUB en línea?
Sí, puedes acceder a Unity 2018 Cookbook de Matt Smith en formato PDF o ePUB, así como a otros libros populares de Informatique y Programmation de jeux. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2018
ISBN
9781788477284
Edición
3
Categoría
Informatique

3D Animation

In this chapter, we will cover the following:
  • Configuring a character's Avatar and idle animation
  • Moving your character with root motion and Blend Trees
  • Mixing animations with Layers and Masks
  • Organizing States into Sub-State Machines
  • Transforming the Character Controller via script
  • Adding rigid props to animated characters
  • Using Animation Events to throw an object
  • Applying Ragdoll physics to a character
  • Rotating the character's torso to aim a weapon
  • Creating geometry with Probuilder
  • Creating a game with the 3D Gamekit
  • Importing third-party 3D models and animations from Mixamo

Introduction

The Mecanim animation system has revolutionized how characters are animated and controlled within Unity. In this chapter, we will learn how to take advantage of its flexibility, power, and friendly and highly visual interface.

The big picture

Controlling a playable character with the Mecanim system might look like a complex task, but it is actually very straightforward:
By the end of the chapter, you will have gained a basic understanding of the Mecanim system. For a more complete overview of the subject, consider taking a look at Jamie Dean's Unity Character Animation with Mecanim, also published by Packt Publishing.
All the recipes will make use of Mixamo motion packs. Mixamo is a complete solution for character production, rigging, and animation. In fact, the character used was designed with Mixamo's character creation software called Fuse and rigged with the Mixamo Auto-Rigger. You can find out more about Mixamo and their products at Unity's Asset Store or the Mixamo website:
https://assetstore.unity.com/packages/3d/animations/melee-axe-pack-35320
https://www.mixamo.com/
Please note that although Mixamo offers Mecanim-ready characters and animation clips, for the recipes in this chapter, we will use unprepared animation clips. The reason for this is to make you more confident when dealing with assets obtained by other methods and sources.

Configuring a character's Avatar and idle animation

One feature that makes Mecanim so flexible and powerful is the ability to quickly reassign Animation Clips from one character to another. This is made possible through the use of Avatars, which are basically a layer between your character's original rig and Unity's Animator system.
In this recipe, we will learn how to configure an Avatar skeleton on a rigged character.

Getting ready

For this recipe, you will need the [email protected] and Swat@rifle_aiming_idle.fbx files, which are provided in the 09_03 folder.

How to do it...

To configure an Avatar skeleton, follow these steps:
  1. Import the [email protected] and Swat@rifle_aiming_idle.fbx files into your project.
  2. Select the MsLaser@T-Pose model from the Project panel.
  3. In the Inspector, under MsLaser@T-Pose Import Settings, activate the Rig section. Change Animation Type to Humanoid. Then, leave Avatar Definition as Create From this Model. Now, click Apply to apply these settings. Finally, click on the Configure... button:
  1. The Inspector will show the newly created Avatar. Observe how Unity correctly mapped the bones of our character to its structure, assigning, for instance, the mixamoRig:LeftForeArm bone as the Avatar's Lower Arm. We could, of course, reassign bones if needed. For now, just click on the Done button to close the view:
  1. Now that we have our Avatar ready, l...

Índice