Unity Cookbook Over 160 Recipes to Craft Your Own Masterpiece in Unity 2023

Unleash your game development potential with Unity Cookbook, 5th Edition, designed to equip you with the skills and knowledge needed to excel in Unity game development. With over 160 expertly crafted recipes empowering you to pioneer VR and AR experiences, excel in mobile game development, and becom...

Descripción completa

Detalles Bibliográficos
Otros Autores: Smith, Matt, 1944- author (author)
Formato: Libro electrónico
Idioma:Inglés
Publicado: Birmingham, England : Packt Publishing Ltd [2023]
Edición:Fifth edition
Materias:
Ver en Biblioteca Universitat Ramon Llull:https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009785405206719
Tabla de Contenidos:
  • Cover
  • Copyright
  • Foreword
  • Contributors
  • Preface
  • Table of Contents
  • Chapter 1: Displaying Data with CoreUI Elements
  • Creating a Font Asset file for use with TextMeshPro
  • Getting ready
  • How to do it...
  • How it works...
  • Displaying a "Hello World" UI text message
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Styling substrings with rich text
  • Exploring the TextMeshPro Examples and Extras
  • Displaying a digital clock
  • Getting ready
  • How to do it…
  • How it works...
  • Displaying a digital countdown timer
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Automatically add components with [RequireComponent(...)]
  • Creating a message that fades away
  • Getting ready
  • How to do it...
  • How it works...
  • Displaying an image
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Working with 2D sprites and UI Image components
  • See also
  • Further reading
  • Chapter 2: Responding to User Events for Interactive UIs
  • Creating a UI Button to reveal an image
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Creating a UI Button to move between scenes
  • How to do it...
  • How it works...
  • There's more...
  • Animating UI Button properties on mouseover
  • How to do it...
  • How it works...
  • Organizing image panels and changing panel depths via buttons
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Moving up or down by just one position, using scripted methods
  • Displaying the value of an interactive UI Slider
  • How to do it...
  • How it works...
  • Displaying a countdown timer graphically with a UI Slider
  • Getting ready
  • How to do it...
  • How it works...
  • Setting custom mouse cursors for 2D and 3D GameObjects
  • Getting ready
  • How to do it...
  • How it works.
  • Setting custom mouse cursors for UI controls
  • Getting ready
  • How to do it...
  • How it works...
  • Interactive text entry with Input Field
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Detecting interactions with a single Toggle UI component
  • Getting ready
  • How to do it...
  • How it works...
  • Creating related radio buttons using UI Toggles
  • Getting ready
  • How to do it...
  • How it works...
  • Creating text UI Dropdown menus
  • How to do it...
  • How it works...
  • Creating image icon UI Dropdown menus
  • Getting ready
  • How to do it...
  • How it works...
  • Displaying a radar to indicate the relative locations of objects
  • Getting ready
  • How to do it...
  • How it works...
  • The Start() method
  • The Update() method
  • The FindAndDisplayBlipsForTag(...) method
  • The CalculateBlipPositionAndDrawBlip (...) method
  • The NormalizedPosition(...) method
  • The CalculateBlipPosition(...) method
  • The DrawBlip() method
  • There's more...
  • Further reading
  • Chapter 3: Inventory and Advanced UIs
  • Creating a simple 2D mini-game - SpaceGirl
  • Getting ready
  • How to do it...
  • How it works...
  • Displaying single object pickups with carrying and not-carrying text
  • Getting ready
  • How to do it...
  • How it works...
  • The PlayerInventory script class
  • The PlayerInventoryDisplay script class
  • There's more...
  • Collecting multiple items and displaying the total number carried
  • Alternative - combining all the responsibilities into a single script
  • Displaying single-object pickups with carrying and not-carrying icons
  • Getting ready
  • How to do it...
  • How it works...
  • Displaying multiple pickups of the same object with multiple status icons
  • Getting ready
  • How to do it...
  • How it works...
  • There's more.
  • Revealing icons for multiple object pickups by changing the size of a tiled image
  • How it works...
  • Using panels to visually outline the inventory UI area and individual items
  • Getting ready
  • How to do it…
  • How it works...
  • Creating a C# inventory slot UI to display scripted components
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Modifying the game for a second inventory panel for keys
  • Displaying multiple pickups of different objects as a list of text via a dynamic List&lt
  • &gt
  • of scripted PickUp objects
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Ordering items in the inventory list alphabetically
  • Displaying multiple pickups of different objects as text totals via a dynamic Dictionary&lt
  • &gt
  • of PickUp objects and enum pickup types
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Separating responsibilities with MVC
  • Further reading
  • Chapter 4: Playing and Manipulating Sounds
  • Setting up the Third Person Character Controller project
  • How to do it...
  • How it works...
  • There's more...
  • Fixing pink textures
  • Playing sound when a scene begins
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Create a GameObject with AudioSource linked to an AudioClip in a single step
  • Make the sound clip keep looping
  • Customizing other AudioSource settings
  • Removing redundant AudioListener components
  • Getting ready
  • How to do it...
  • How it works...
  • Enabling and customizing 3D sound effects
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Changing the way the volume changes with distance
  • Adding keys to customize the volume falloff curve
  • Adding effects with Audio Reverb Zones
  • Getting ready
  • How to do it...
  • How it works...
  • There's more.
  • Customize Reverb settings with the User preset
  • Playing different one-off sound effects with a single AudioSource component
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Playing a sound at a static point in 3D world space
  • Playing and controlling different sounds, each with its own AudioSource component
  • Getting ready
  • How to do it...
  • How it works...
  • Creating just-in-time AudioSource components at runtime through C# scripting
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Adding the CreateAudioSource(...) method as an extension to the MonoBehavior class
  • A button to play a sound with no scripting
  • Getting ready
  • How to do it...
  • How it works...
  • Preventing an audio clip from restarting if it is already playing
  • Getting ready
  • How to do it...
  • How it works...
  • Waiting for the audio to finish playing before auto-destructing an object
  • Getting ready
  • How to do it...
  • How it works...
  • See also
  • Creating audio visualization from sample spectral data
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Adding visualizations to a second AudioSource component
  • Trying out different Fast Fourier Transform (FFT) window types
  • Synchronizing simultaneous and sequential music to create a simple 140 bpm music-loop manager
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Adding visualizations to the four playing loops
  • Recording sound clips with the free Audacity application
  • Getting ready
  • How to do it...
  • How it works...
  • Further reading
  • Chapter 5: Textures, Materials, and 3D Objects
  • Creating a scene with 3D primitives and a texture
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Enhancing the scene - adding a spotlight.
  • Creating material asset files and setting Albedo textures
  • Getting ready
  • How to do it...
  • How it works...
  • Exporting Blender files as FBX for use in Unity
  • Getting ready
  • How to do it...
  • How it works...
  • Importing FBX models into a Unity project
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Using Blender files directly in a Unity project
  • Highlighting GameObject materials on mouseover
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • A collider needed for custom meshes
  • Changing the material's color in response to mouse events
  • Fading the transparency of a material
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Destroying objects when fading is complete
  • Using the GameObject's alpha as our starting alpha value
  • Using a coroutine for our fading loop
  • Further reading
  • Chapter 6: Creating 3D Environments with Terrains
  • Creating and texture-painting terrains
  • Getting ready
  • How to do it...
  • How it works...
  • Unity terrain tools and samples for powerful height-painting
  • Getting ready
  • How to do it...
  • How it works...
  • There's more…
  • Adding terrain holes
  • Getting ready
  • How to do it...
  • How it works...
  • Adding trees and vegetation
  • Getting ready
  • How to do it…
  • How it works...
  • Realistic water features for HDRP projects
  • How to do it...
  • How it works...
  • Further reading
  • Chapter 7: Creating 3D Geometry with ProBuilder
  • Getting started with ProBuilder
  • Getting ready
  • How to do it...
  • How it works...
  • Transforming an object through scaling and coloring
  • Getting ready
  • How to do it...
  • How it works...
  • Creating a house with ProBuilder
  • Getting ready
  • How to do it...
  • How it works...
  • Exploring ProBuilder Boolean operations to add a window to our house
  • Getting ready.
  • How to do it.