更新时间:2021-07-09 21:57:26
coverpage
Unity 5.x Cookbook
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Support files eBooks discount offers and more
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Conventions
Reader feedback
Customer support
Chapter 1. Core UI – Messages Menus Scores and Timers
Introduction
Displaying a "Hello World" UI text message
Displaying a digital clock
Displaying a digital countdown timer
Creating a message that fades away
Displaying a perspective 3D text message
Displaying an image
Creating UI Buttons to move between scenes
Organizing images inside panels and changing panel depths via buttons
Displaying the value of an interactive UI Slider
Displaying a countdown timer graphically with a UI Slider
Displaying a radar to indicate the relative locations of objects
Creating UIs with the Fungus open-source dialog system
Setting custom mouse cursor images
Input Fields component for text entry
Toggles and radio buttons via Toggle Groups
Conclusion
Chapter 2. Inventory GUIs
Creating a simple 2D mini-game – SpaceGirl
Displaying single object pickups with carrying and not-carrying text
Displaying single object pickups with carrying and not-carrying icons
Displaying multiple pickups of the same object with text totals
Displaying multiple pickups of the same object with multiple status icons
Revealing icons for multiple object pickups by changing the size of a tiled image
Displaying multiple pickups of different objects as a list of text via a dynamic List<> of PickUp objects
Displaying multiple pickups of different objects as text totals via a dynamic Dictionary<> of PickUp objects and "enum" pickup types
Generalizing multiple icon displays using UI Grid Layout Groups (with scrollbars!)
Chapter 3. 2D Animation
Flipping a sprite horizontally
Animating body parts for character movement events
Creating a 3-frame animation clip to make a platform continually animate
Making a platform start falling once stepped-on using a Trigger to move animation from one state to another
Creating animation clips from sprite sheet sequences
Chapter 4. Creating Maps and Materials
Creating a basic material with Standard Shader (Specular setup)
Adapting a basic material from Specular setup to Metallic
Applying Normal maps to a material
Adding Transparency and Emission maps to a material
Highlighting materials at mouse over
Adding Detail maps to a material
Fading the transparency of a material
Playing videos inside a scene
Chapter 5. Using Cameras
Creating a picture-in-picture effect
Switching between multiple cameras
Making textures from screen content
Zooming a telescopic camera
Displaying a mini-map
Creating an in-game surveillance camera
Chapter 6. Lights and Effects
Using lights and cookie textures to simulate a cloudy day
Adding a custom Reflection map to a scene
Creating a laser aim with Projector and Line Renderer
Reflecting surrounding objects with Reflection Probes
Setting up an environment with Procedural Skybox and Directional Light
Lighting a simple scene with Lightmaps and Light Probes
Chapter 7. Controlling 3D Animations
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
Chapter 8. Positions Movement and Navigation for Character GameObjects
Player control of a 2D GameObject (and limiting the movement within a rectangle)
Player control of a 3D GameObject (and limiting the movement within a rectangle)
Choosing destinations – find the nearest (or a random) spawn point
Choosing destinations – respawn to the most recently passed checkpoint
NPC NavMeshAgent to seek or flee destination while avoiding obstacles