Index

Symbols

* (asterisk) character 57

2D Editor mode 105

2D functionality 103126

2D graphics setup 104109

displaying sprites 107108

preparing projects 105106

switching cameras to 2D mode 108109

2D functionality

card objects

building 110112

reacting to clicks 110112

displaying card images 112118

instantiating grids of cards 115116

loading images programmatically 112113

setting images 113115

shuffling cards 117118

matches in card games 118122

comparing revealed cards 119

hiding mismatched cards 119120

scoring 118122

storing revealed cards 119

restart buttons 122126

calling LoadScene 125126

programming UIButton components using SendMessage 123124

2D image editors 340341

Aseprite 341

GIMP 340

Photoshop 340

Pyxel Edit 341

TexturePacker 340

2D images, texture scenes with 8186

applying images 8486

choosing file formats 8283

importing image files 8384

2D Rect tool 337

2D Scene view 105

2D sounds 257

3D coordinate space 2449

applying transforms 3437

local vs. global coordinate spaces 3637

visualizing movement programming 34

writing code to implement diagrams 3436

first-person controls 4449

adjusting components for walking instead of flying 4749

moving CharacterController for collision detection 4647

responding to keypresses 4445

setting rate of movement independent of computer speed 4546

overview 252628

placing objects in scenes 2834

cameras 3132

colliders 3334

floors 2931

inner walls 2931

lights 3132

outer walls 2931

viewpoints 3334

planning projects 2526

responding to input from mouse 3743

horizontal and vertical rotation at same time 4143

horizontal rotation tracking mouse movements 3839

vertical rotation with limits 3941

3D models 8992

file formats

for 3D models 90

choosing file formats 90

exporting 9192

importing 9192

3D objects, attaching particle effects to 9899

3ds Max software 339

3D sounds 257

3D space, rotating 29

A

acceleration, applying 182184

Action type 235

Activate( ) function 206

active variable 275

AddComponentMenu method 48

AddForce( ) command 138

AddItem( ) method 214

Additive shader 98

ad hoc distribution 321

Agasper Android Notifications 353

AI (artificial intelligence) 6063

diagramming 60

enemies, implementing 279280

seeing obstacles with raycast 6162

tracking character states 63

aiming, adding visual indicators for 5457

alerting targets, when hit 5860

alpha channel 82

anchor points 154, 155

Android operating system

build tools 321322

developing plug-ins 328331

animation clips 133

animation loops 190

animation root 191

animations

defined 76

triggering animations from code 135136

using Mecanim animation system 133134

setting up on players 188196

animator controllers, creating 192195

defining animation clips in imported models 190191

operating animators 195196

animators

controllers, creating 192195

operating 195196

anonymous function 247

Application.ExternalEval( ) method 316

Application.persistentDataPath 302

Application.Quit( ) method 311

art assets, overview of 7477

Aseprite tool 341

AssetBundles 246

assets

art assets 7477

assembling from multiple projects 278280

AI enemies 279280

updating managers frameworks 278279

assigning looping sounds 258259

asterisk (*) character 57

atmospheres, controlled by code 228230

Attach Unity Debugger option, Debug menu 20

Audacity application 341

audio 252275

audio control interface 260266

playing UI sounds 266

setting up central AudioManager 261262

volume control UI 263265

background music 267275

controlling music volume separately 271273

fading between songs 273275

playing music loops 267270

importing clips 268

importing files 255256

importing sound effects 253256

importing audio files 255256

supported file formats 253

playing clips in AudioManager 269

playing sound effects 257260

assigning looping sounds 258259

AudioClip 257258

AudioListener 257258

AudioSource 257258

triggering sound effects from code 259260

software 341

Audacity 341

Pro Tools 341

AudioClip 257258

audio listener 258

AudioListener class 257, 258, 264

AudioManager

playing audio clips in 269

setting up 261262

setting up AudioSource for 268

AudioMixer 258

audio source 258

AudioSource

overview 257, 258

setting up for AudioManager 268

Awake( ) method 165, 213

axes points 28

B

BackAndForth script 98

background music 267275

controlling volume separately 271273

fading between songs 273275

playing loops 267270

adding music controls to UI 270

importing audio clips 268

playing audio clips in AudioManager 269

setting up AudioSource for AudioManager 268

BaseDevice script 283

BasicUI script 218

billboards, adding 242248

caching downloaded images for reuse 246248

displaying images on billboards 245246

loading images from internet 242245

Blender suite 340, 342350

building mesh geometry 343346

texture mapping models 346350

.blend file 89

Blend property 229

broadcasting

events from HUDs 166168

events from scenes 165166

browsers, communicating with JavaScript in 315318

build tools 319322

setting up Android build tools 321322

setting up iOS build tools 319321

buttons, in GUI 152154

C

caching downloaded images, for reuse 246248

CallAPI( ) method 235, 249

callbacks 235236

cameras 3132

adjusting view for third-person games 172177

adding shadows to scenes 173175

importing characters 172173

orbiting around characters 175177

controlling 144145

programming camera-relative movement controls 178181

moving forward 180181

rotating character to face movement direction 178180

switching to 2D mode 108109

card_back sprite 110

card games

displaying card images 112118

instantiating grids of cards 115116

loading images programmatically 112113

setting images 113115

shuffling cards 117118

making matches in 118122

comparing revealed cards 119

hiding mismatched cards 119120

storing revealed cards 119

overview 118120

text displays for scores 120122

CardRevealed( ) method 118

cards

building objects 110, 112

comparing revealed 119

hiding mismatched 119120

instantiating grids of 115116

reacting to clicks 110112

mouse input code 111

revealing on clicks 111112

shuffling 117118

storing revealed 119

Cartesian coordinate system 26

Cast Shadows setting, Inspector 175

Catlike Coding 352

ChangeHealth( ) method 222, 287

CharacterController, moving for collision detection 4647

CharacterController.Move( ) method 181

characters

importing 172173

orbiting camera around 175177

rotating to face movement direction 178180

tracking states 63

CheckMatch( ) method 120

CheckpointTrigger script 250

children 30

Clamp( ) method 40, 88

clicks, cards reacting to 110112

mouse input code 111

revealing on clicks 111112

clipping planes 281

closing doors, on keypress 198200

code

assembling from multiple projects 278280

implementing AI enemies 279280

updating managers frameworks 278279

atmospheres controlled by 228230

networking code 236237

server-side in PHP 250251

triggering animations from 135136

triggering sound effects from 259260

writing movement code 281283

writing to implement diagrams 3436

code libraries 352353

Agasper Android Notifications 353

DOTween 352

FMOD Studio 353

iTween 352

LeanTween 352

Play Games services from Google 353

post-processing stacks 352

prime[31] 353

Unify community wiki 352

Collada 90

CollectibleItem script 207

collecting items 207208

collection objects, storing inventory in, List vs. Dictionary 214216

colliders 3334

colliding

with physics-enabled obstacles 203204

with targets 7072

with walls 132133

collision detection, moving CharacterController for 4647

ColorChangeDevice script 202, 284

color-changing monitors, operating 202

comparing revealed cards 119

compilations, platform-dependent 312313

components

adjusting for walking instead of flying 4749

overview 5

computer speed, setting rate of movement independent of 4546

D

deploying

to consoles 1011

consoles, deploying to 1011

ConsumeItem( ) method 222

ContainsKey( ) method 216

controller object 157

controllers

animator controllers, creating 192195

programming camera-relative movement 178181

moving forward 180181

rotating character to face movement direction 178180

coordinate spaces, local vs. global 3637

coroutines

overview 54

requesting HTTP data using 234237

callbacks 235236

networking code 236237

writing code 234235

writing coroutine methods 235

CSG (Constructive Solid Geometry) 79

Cube objects 31

culling 175

culling mask 175

damaging players 7273

data, posting to web servers 248251

sending post requests 249250

server-side code in PHP 250251

DataManager script 301

Deactivate( ) function 206

Debug.Log( ) command 22

Debug statement 119

delta lines 42

deltaTime value 45

deploying

games to devices 307318332

building for desktops 310313

building for web 313318

developing plug-ins 324332

setting up build tools 319322

texture compression 323324

deserialize 240

deploying

to desktop platforms 8

desktop platforms

building games for 310313

building applications 310311

platform-dependent compilations 312313

setting game names 311312

setting icons 311312

deploying to 8

Destroy( ) method 60, 68

detecting ground 184187

DeviceOperator script 201, 245

devices

deploying games to 307332

building for desktops 310313

building for web 313318

developing plug-ins 324332

setting up build tools 319322

texture compression 323324

operating using mouse 283285

DeviceTrigger script 205, 219

diagrams

for AI 60

writing code to implement 3436

Dictionary objects, List objects vs. 214216

DifferentInventoryManager 209

directional lights 31

displaying

card images 112118

instantiating grids of cards 115116

loading images programmatically 112113

setting images 113115

shuffling cards 117118

images on billboards 245246

inventory items 217219

sprites 107108

text for scores 120122

distance property 62

distances, checking before opening doors 200201

DLLImport command 316, 325

DontDestroyOnLoad( ) method 125, 294

DontRequireReceiver option 201

doors 198202

checking distance and facing before opening 200201

equipping keys for 219221

opening and closing on keypress 198200

triggering with pressure plates 204207

Dot( ) function 187

dot product 187

DOTween engine 352

downloading weather data, from internet services 231242

parsing JSON 239241

parsing XML 237239

requesting HTTP data using coroutines 234237

scenes based on weather data 241242

drawing floor plans 7879

dynamic string 163

E

edge selection mode, blender 347

effects, particle systems 9499

adjusting parameters on default effects 95

applying textures for fire 9598

attaching particle effects to 3D objects 9899

elements, controlling position in GUI 154156

enemies

adding to 3D games 5073

AI, implementing 279280

losing levels when caught by 298300

spawning prefabs 6467

enemy prefabs, creating 6566

instantiating from invisible scripts 6667

overview 6465

enemy variable 67

EquipItem( ) method 220

equippedItem property 220

error messages 23

ETC (Ericsson Texture Compression) 323

Euler angles property 41

events, responding to 164168

broadcasting events from HUDs 166168

broadcasting events from scenes 165166

integrating event systems 164165

listening for events from HUDs 166168

listening for events from scenes 165166

EventSystem object 150, 156

EventTrigger component 158

exits, completing levels by reaching 296298

exporting 3D models 9192

external tools 338341

2D image editors 340341

Aseprite 341

GIMP 340

Photoshop 340

Pyxel Edit 341

TexturePacker 340

audio software 341

Audacity 341

Pro Tools 341

programming tools 338340

3ds Max 339

Blender 340

Maya 339

SketchUp 340

Extrude Individual command, Mesh menu 345

F

Face Selection mode, Blender 345

facing, checking before opening doors 200201

fading, between songs 273275

FBX export 90

File.Create( ) method 302

File.CreateText( ) method 302

fire, applying textures for 9598

first-person controls 4449

adjusting components for walking instead of flying 4749

moving CharacterController for collision detection 4647

responding to keypresses 4445

setting rate of movement independent of computer speed 4546

first-person shooter scene 25

first-person views 172

Fisher-Yates algorithm 118

float parameters 135

floors

overview 2931

placing in platformer games 129

flying, adjusting components for walking instead of 4749

FMOD Studio 275, 353

FollowCam script 144

FPS (first-person shooter) scene 25

FPSInput script 44

frame rate dependent 45

frame rate independent 45

frames 19

frameworks, managers 278279

freezeRotation property 42

FSM (finite state machines) 63

G

GameEvent script 165

GameObject class 31

gameObject property 58

games

beating by completing three levels 304305306

developing overarching structure 292300

completing levels by reaching exits 296298

controlling mission flow and multiple levels 292296

losing levels when caught by enemies 298300

programming managers 210214

game states, managing 208216

programming game managers 210214

setting up player managers 209210

geometry mesh, building 343346

GetAxis( ) method 39, 44, 183

GetButtonDown( ) function 183

GetComponent( ) method 58, 113, 143

GetItemCount( ) method 217

GetItemList( ) method 217

GetWeatherXML( ) method 235

GetWebImage( ) method 244, 247

GIMP (GNU Image Manipulation Program) 340

gitignore file 7

gizmos 141

Gizmos menu 128

global coordinate spaces, local vs. 3637

GNU Image Manipulation Program 340

Google, Play Games services 353

graphics 7499

2D setup 104109

displaying sprites 107108

preparing projects 105106

switching cameras to 2D mode 108109

3D models 8992

choosing file formats 90

exporting 9192

importing 9192

art assets, overview of 7477

creating effects using particle systems 9499

adjusting parameters on default effects 95

applying textures for fire 9598

attaching particle effects to 3D objects 9899

importing sprite sheets 129130

placing floors 129

placing walls 129

generating sky visuals using texture images 8689

skybox, overview of 8687

skybox material, creating 8789

texture scenes with 2D images 8186

applying images 8486

choosing file formats 8283

importing image files 8384

whiteboxing 7780

drawing floor plans 7879

laying out primitives according to plans 7980

overview of 78

gravity, falling from 136137

gravity variable 47, 48

grayboxing 77

grids, of cards 115116

ground

detecting 138139

modifying detection of 184187

grounded variable 139

GUI.Label( ) method 57

GUI (graphical user interface) 146168

buttons 152154

canvas for interface, creating 150152

controlling position of elements 154156

images 152154

programming interactivity in 156163

pop-up windows, creating 158161

programming UI interaction 157158

setting values using input fields 162163

setting values using sliders 162163

replacing with new interfaces 285288292

responding to events 164168

broadcasting events from HUDs 166168

broadcasting events from scenes 165166

integrating event systems 164165

listening for events from HUDs 166168

listening for events from scenes 165166

text labels 152154

H

health, restoring by consuming health packs 221222

hiding mismatched cards 119120

hits

adding visual indicators for 5457

alerting targets 5860

determining 5758

HTML5/WebGL, Unity Player vs. 313

HTTP data, requesting using coroutines 234237

callbacks 235236

networking code 236237

writing code 234235

writing coroutine methods 235

HUDs (heads-up displays)

broadcasting events from 166168

listening for events from 166168

Hurt( ) method 73

I

icons, setting 311312

icons array 291

IDE (integrated development environment) 5

id property 114

IEnumerator 55

IGameManager interface 209, 278

images

applying 8486

caching for reuse 246248

displaying card images 112118

in GUI 152154

instantiating grids of cards 115116

loading images programmatically 112113

setting images 113115

shuffling cards 117118

displaying on billboards 245246

importing files 8384

loading from internet 242245

ImagesManager.GetWebImage( ) method 246

image variable 112

importing

3D models 9192

audio clips 268

characters 172173

image files 8384

sound effects 253256

importing audio files 255256

supported file formats 253

sprite sheets 129130

inactive variable 275

indicators

for aiming 5457

for hits 5457

Initialize( ) function 325

Input.GetAxis( ) method 39, 179

Input.GetMouseButtonDown method 53

Input.GetTouch( ) method 318

Input.touchCount 318

input fields, setting values with 162163

Instantiate( ) method 65, 67, 115

instantiating

from invisible scripts 6667

grids of cards 115116

objects, shooting by 6873

colliding with targets 7072

damaging players 7273

projectile prefabs, creating 6870

shooting projectiles 7072

integrating event systems 164165

interacting with objects 203208

collecting items 207208

colliding with physics-enabled obstacles 203204

triggering doors with pressure plates 204207

interactivity 156163

pop-up windows, creating 158161

programming UI interaction 157158

setting values using input fields 162163

setting values using sliders 162163

internet

downloading weather data from services 231242

parsing JSON 239241

parsing XML 237239

requesting HTTP data using coroutines 234237

scenes based on weather data 241242

loading images from 242245

interpolate 179

int parameter 270

intro-synth variable 269

inventory

implementing pop-ups 288292

managing data 208216

setting up inventory managers 209210

storing inventory in collection objects 214216

UI (user interface) 216222

displaying inventory items in 217219

equipping key to use on locked doors 219221

restoring health by consuming health packs 221222

InventoryManager 209

iOS (Apple operating system)

build tools 319321

developing plug-ins 325328

isGrounded property 184

items, collecting 207208

iTween animation system 352

J

JavaScript language, in browsers 315318

JSListener 315

JSON (JavaScript Object Notation) 239241

jump control 283

jumping 136139, 182187

applying acceleration 182184

applying upward impulses 138

applying vertical speed 182184

detecting ground 138139

falling from gravity 136137

modifying ground detection 184187

Jumping Boolean 196

K

keyboard controls, writing 131132

keyboard shortcuts 336337

keypresses

opening and closing doors on 198200

responding to 4445

keys, equipping for locked doors 219221

Knuth algorithm 118

L

lambda function 247

LateUpdate( ) function 144, 176

lazy-loading 267

LeanTween engine 352

left-handed coordinates 28

Lerp 179

level design 78

levels

adding 305306

beating games by completing three 304306

completing by reaching exits 296298

losing when caught by enemies 298300

multiple, controlling 292296

separate scenes for 294296

lightmaps 174

lights 3132

light sources 31

List.Add( ) method 213

listening

for events from HUDs 166168

for events from scenes 165166

List objects, Dictionary objects vs. 214216

loading player progress 300304

LoadScene, calling 125126

local coordinate spaces, global vs. 3637

localEulerAngles property 41

localRotation property 41

LocomotionCharge 64

LocomotionSlink 64

LookAt( ) method 177

Loop Pose 190

loops

assigning looping sounds 258259

music, playing 267270

adding music controls to UI 270

importing audio clips 268

playing audio clips in AudioManager 269

setting up AudioSource for AudioManager 268

Loop Time 190

loop variable 269

M

manager-of-managers 209

managers, updating frameworks 278279

mapping models, texture 346350

matches

making in card games 118122

comparing revealed cards 119

hiding mismatched cards 119120

storing revealed cards 119

scoring in card games 118120122

material 69, 75

Mathf.Clamp( ) method 40

Maya animation software 339

Maya LT game development software, guide for 352

Mecanim animation system 93, 133134, 189

MemoryCard.cs script 111

mesh elements 344

mesh geometry, building 343346

mesh object 13, 75

MiniJSON 239

MissionManager script 292, 304, 305

missions, controlling flow of 292294296

deploying

to mobile platforms 9

mobile platforms, deploying to 9

MobileTestObject script 326

modeling in Blender 342350

building mesh geometry 343346

texture mapping models 346350

models

3D 8992

choosing file formats 90

exporting 9192

importing 9192

imported 190191

texture mapping 346350

monitors, color-changing 202

MonoBehaviour class 17, 31, 56

MonoDevelop 338

mouse

input code 111

navigating scenes using 336337

operating devices using 283285

responding to input from 3743

horizontal and vertical rotation at same time 4143

horizontal rotation tracking mouse movements 3839

vertical rotation with limits 3941

MouseDown function 123

MouseEnter function 123

MouseExit function 123

code

for mouse input 111

mouse picking 52

MouseUp function 123

Move( ) method 46

movement

setting rate independent of computer speed 4546

visualizing programming of 34

writing code 281283

movement script 135

MovingPlatform script 141

Multiply shader 98

MVC (Model-View-Controller) 198

N

names, setting game names 311312

NameToLayer( ) method 285

navigating scenes 336337

Near/Far clipping planes 281

networked billboards, adding 242248

caching downloaded images for reuse 246248

displaying images on billboards 245246

loading images from internet 242245

networking code 236237

NetworkService.DownloadImage( ) method 247

NetworkService class 231

normal property 187

normals 173

No Shadows option, Inspector 173

O

ObjectiveTrigger script 298

OBJ file 80

obstacles

physics-enabled, colliding with 203204

seeing with raycast 6162

OnControllerColliderHit function 187

OnDestroy( ) method 166

OnDrawGizmos( ) method 141

OnEnemyHit( ) method 165

OnEquip( ) method 291

OnGUI( ) method 56, 148, 218

online learning resources 351353

code libraries 352353

Agasper Android Notifications 353

DOTween 352

FMOD Studio 353

iTween 352

LeanTween 352

Play Games services from Google 353

post-processing stacks 352

prime[31] 353

Unify community wiki 352

tutorials 351352

Catlike Coding 352

game development at StackExchange 352

Maya LT guide 352

script references 351

Unity Learn tutorials 351

Unity manual 351

OnMouseDown( ) function 111

OnMusicToggle( ) method 272

OnMusicValue( ) method 272

OnOpenSettings( ) method 157

OnPointerDown( ) method 158

OnSoundToggle( ) method 265

OnSoundValue( ) method 264

OnSpeedValue( ) method 163

OnSubmitName( ) function 162

OnTriggerEnter( ) method 72, 206, 220

OnTriggerExit( ) method 206

OnUse( ) method 291

OnWeatherUpdated( ) method 241

OnXMLDataLoaded( ) method 237

OOP (object-oriented programming) 5

opening

checking distance and facing before 200201

doors on keypress 198200

Operate( ) method 199, 284

OrbitCamera script 175, 281

orbiting camera around characters 175177

outdoor scenes 227230

atmospheres controlled by code 228230

generating sky visuals with skybox 227228

OverlapSphere( ) method 200

P

parameters

adjusting default effects 95

overview 135

parents 30

parsing

JSON 239241

XML 237239

particle effects, attaching to 3D objects 9899

particle systems

creating effects using 9499

adjusting parameters on default effects 95

applying textures for fire 9598

attaching particle effects to 3D objects 9899

overview 75, 76

Path.DirectorySeparatorChar 303

PCM (Pulse Code Modulation) 256

Photoshop editing software 340

PHP (hypertext preprocessor), server-side code in 250251

Physics.Raycast( ) method 52, 54, 186

Physics.SphereCast( ) method 62

pixelHeight value 54

pixel-perfect 109

Pixels-Per-Unit setting 107

pixelWidth value 54

plans

drawing floor plans 7879

laying out primitives according to 7980

platform defines 312

platform-dependent compilations 312313

for platformer games 128130

platformer games 127145

adding jump ability 136139

applying upward impulses 138

detecting ground 138139

falling from gravity 136137

camera control 144145

implementing moving platforms 141143

moving player left and right 130133

colliding with walls 132133

writing keyboard controls 131132

one-way platforms 140

playing sprite animations 133136

triggering animations from code 135136

using Mecanim animation system 133134

setting up graphics for 128130

importing sprite sheets 129130

placing floors 129

placing walls 129

slopes 140

PlatformerPlayer script 131

platforms

moving 141143

one-way 140

PlatformTest script 313

Play( ) method 260

PlayerManager 209

Player object 33

PlayerPrefs method 163

players

damaging 7273

handling progression 300306

beating games by completing three levels 304306

saving and loading player progress 300304

moving left and right 130133

colliding with walls 132133

writing keyboard controls 131132

setting up animations on 188196

animator controllers, creating 192195

defining animation clips in imported models 190191

operating animators 195196

setting up managers 209210

Play Games services from Google 353

PlayMusic( ) method 269

PlayOneShot( ) method 260, 269

plug-ins, developing 324332

Android plug-ins 328331

iOS plug-ins 325328

PNG format 82

point-and-click controls, programming 280285

operating devices using mouse 283285

top-down view of scenes 281

writing movement code 281283

PointClickMovement script 282

Pointer_stringify( ) method 316

point lights 31

popup sprite 159

pop-up windows

creating 158161

inventory, implementing 288292

posting data to web servers 248251

sending post requests 249250

server-side code in PHP 250251

post-processing stacks 352

#pragma strict directive 17

prefabs

creating 6566

spawning 6467

overview 6465

projectile, creating 6870

pressure plates, triggering doors with 204207

prime[31] plug-in 353

primitives, laying out according to plans 7980

programmer art 77

programming external tools 338340

3ds Max 339

Blender 340

Maya 339

SketchUp 340

progression of players 300306

beating games by completing three levels 304306

saving and loading player progress 300304

projectiles

adding to 3D games 5073

shooting by instantiating objects 6873

colliding with targets 7072

creating projectile prefabs 6870

damaging players 7273

shooting projectiles 7072

shooting via raycasting 5157

adding visual indicators for aiming 5457

adding visual indicators for hits 5457

overview 5152

ScreenPointToRay command for 5254

projects, planning 2526

Pro Tools 341

provisioning profiles 320

Pyxel Edit drawing application 341

Q

QuadsBox object 79

Quality settings, Inspector 313

Quaternion.Euler 176

Quaternion.Lerp( ) method 179

Quaternion.LookRotation( ) method 179

Quaternion.Slerp( ) method 283

quaternions 41

R

Random.Range( ) method 62, 115

Raycast( ) method 54

raycasting 50

overview 5152

seeing obstacles with 6162

shooting via 5157

adding visual indicators for aiming 5457

adding visual indicators for hits 5457

ScreenPointToRay command for 5254

RayShooter class 53, 56

S

scripts

for reactive targets 5760

ReactiveTarget script 57, 63, 279

ReactToHit( )method 59

real-time shadow 174

Receive Shadows setting, Inspector 175

Rect tool 15, 110

Refresh( ) method 288

RelativeMovement script 178

Remove Component option, Inspector 33

rendering 57

RequireComponent( ) method 48, 181

requireKey option 221

Resources.Load( ) method 217, 219, 267

Restart( ) method 125

restart buttons 122126

calling LoadScene 125126

programming UIButton components using SendMessage 123124

restoring health, by consuming health packs 221222

revealing cards on clicks 111112

right-handed coordinates 28

Rigidbody2D.velocity 132

Rigidbody component 42, 72

Rotate( ) method 35, 36, 39, 41

rotating

characters to face movement direction 178180

horizontally and vertically at same time 4143

horizontally tracking mouse movements 3839

vertically with limits 3941

rotationX variable 40

RPGs (role playing games), building by repurposing projects 277292

assembling assets from multiple projects 278280

programming point-and-click controls 280285

replacing GUI with new interface 285292

SabreCSG 79

saving player progress 300304

scenes

adding shadows to 173175

based on weather data 241242

broadcasting events from 165166

listening for events from 165166

navigating 336337

outdoors 227230

atmospheres controlled by code 228230

generating sky visuals with skybox 227228

placing objects in 34

cameras 3132

collider 3334

floors 2931

inner walls 2931

lights 3132

outer walls 2931

viewpoint 3334

separate for startups and levels 294296

top-down view of 281

scoring matches in card games 118120122

scratch folder 76

ScreenPointToRay command, for shooting 5254

Screen Space-Camera settting 150

Screen Space-Overlay setting 150

scripts

3D, attaching particle effects to 9899

alerting targets when hit 5860

determining hits 5758

interacting with 203208

collecting items 207208

colliding with physics-enabled obstacles 203204

triggering doors with pressure plates 204207

invisible, instantiating from 6667

placing in scenes 34

cameras 3132

collider 3334

floors 2931

inner walls 2931

lights 3132

outer walls 2931

viewpoint 3334

references 351

shooting by instantiating 6873

colliding with targets 7072

creating projectile prefabs 6870

damaging players 7273

shooting projectiles 7072

storing inventory in collection objects 214216

seamless tile 83

SendMessage( ) method 123124, 201, 317, 324

sensitivityHor variable 38

serialize 240

SerializeField 66

serializing values 35

server-side code, in PHP 250251

SetActive( ) method 112

SetCard( ) method 114

SetFloat( ) method 229

SetOvercast( ) method 230, 241

SettingsPopup script 160, 264

shader 87

shadows, adding to scenes 173175

Shadow Type option, Inspector 173

shooting

by instantiating objects 6873

colliding with targets 7072

creating projectile prefabs 6870

damaging players 7273

shooting projectiles 7072

via raycasting 5157

adding visual indicators for aiming 5457

adding visual indicators for hits 5457

overview 5152

ScreenPointToRay command for 5254

shortcuts, with keyboard 336337

shuffling cards 117118

sideloading 322

SimpleJSON 239

skeletal animation 188

SketchUp modeling software 340

SkyboxBlended 228

skyboxes

creating material for 8789

generating sky visuals with 227228

overview 8687

sky visuals

generating using texture images 8689

creating skybox material 8789

skybox, overview of 8687

generating with skybox 227228

Slerp (spherical linear interpolation) 179

sliced image 159

Slider object 295

sliders, setting values with 162163

slopes 140

SmoothDamp function 144

solutions 20

songs, fading between 273275

file formats

for sound effects 253

sound effects 257260

assigning looping sounds 258259

AudioClip 257258

AudioListener 257258

AudioSource 257258

importing 253256

importing audio files 255256

supported file formats 253

triggering from code 259260

soundMute 264

soundVolume 264

spawning enemy prefabs 6467

creating enemy prefabs 6566

instantiating from invisible scripts 6667

overview 6465

SPEED_CHANGED listener 167

speed, vertical 182184

SphereCast( )method 61

SphereIndicator( ) method 55, 56

Sphere objects 31

spherical linear interpolation 179

spot lights 31

Sprite Packer 107

sprite property 113

SpriteRenderer component 113

sprites 104

animations

of sprites 133136

building card objects from 110

displaying 107108

importing sprite sheets 129130

playing animations of 133136

triggering animations from code 135136

using Mecanim animation system 133134

sprite sheet 107

SSAO (screen space ambient occlusion) 4

StackExchange network, game development at 352

stacks, post-processing 352

Start( ) method 17, 22

StartCoroutine( ) method 56, 234, 237

Startup( ) function 232, 272

StartupEvent script 292

startups, separate scenes for 294296

state machines 63

static extern command 325

status property 210

storing revealed cards 119

SVN (Subversion) 339

SyntaxTree 338

T

table_top sprite 107

Targas (TGA) format 82

targetObject.SendMessage( ) method 124

target property 178

targets

colliding with 7072

reactive, scripting 5760

alerting targets when hit 5860

determining hits 5758

targets property 206

TestPlugin class 325, 329

TestPostBuild script 310

text labels, in GUI 152154

Text Mesh component 121

texture compression 323324

texture coordinates 92, 346

texture images, generating sky visuals using 8689

creating skybox material 8789

skybox, overview of 8687

texture mapping

models 346350

overview 347

TexturePacker tool 340

textures, applying for fire 9598

file formats

for texture scenes 8283

texture scenes, with 2D images 8186

applying images 8486

choosing file formats 8283

importing image files 8384

Texture Type setting 150

third-person games 169196

adjusting camera view for 172177

adding shadows to scenes 173175

importing characters 172173

orbiting camera around characters 175177

implementing jump action 182187

applying acceleration 182184

applying vertical speed 182184

modifying ground detection 184187

programming camera-relative movement controls 178181

moving forward 180181

rotating character to face movement direction 178180

setting up animations on player characters 188196

creating animator controllers 192195

defining animation clips in imported models 190191

operating animators 195196

third-person views 172

this.gameObject.GetComponent( ) method 181

tileable image 83

tilemaps 139

time variable 144

touch input 318

T-pose 173

tracking character states 63

transform 29

transform.position 116

Transform class 21, 35

TransformDirection( ) method 47, 179

transforms, applying 3437

local vs. global coordinate spaces 3637

visualizing movement programming 34

writing code to implement diagrams 3436

Transition settings, Inspector 194

Translate( ) method 44, 62, 63

triggering

animations from code 135136

doors with pressure plates 204207

sound effects from code 259260

tutorials 351352

Catlike Coding 352

game development at StackExchange 352

Maya LT guide 352

script references 351

Unity Learn tutorials 351

Unity manual 351

tween 60, 200, 352

U

UI (user interface)

adding music controls to 270

for inventory 216217219, 222

overview 120

playing sounds 266

for volume control 263265

UIButton, programming components using SendMessage 123124

UIButton.cs script 123

UIController script 297

Unify community wiki 352

Unikron Software 103

UNITY_ANDROID platform 329

Unity platform

advantages of using 411

deploying to consoles 1011

deploying to desktop platforms 8

deploying to mobile platforms 9

example games built with 711

Learn tutorials 351

manual 351

overview 323

Unity Player, HTML5/WebGL vs. 313

UnityPlayer.UnitySendMessage( ) method 331

UnityScript 17

UnitySendMessage( ) method 327

UnityWebRequest class 234, 242, 246

Unreveal( ) method 120

unwrapping 347

Update( ) method 17, 34, 55, 200, 283

UpdateData( ) method 300

updating managers frameworks 278279

UV coordinates 347

UV unwrapping 347

V

values

setting using input fields 162163

setting using sliders 162163

VCS (version control system) 339

Vector3.ClampMagnitude( ) method 46, 181

Vector3.Dot( ) method 201

vectors 41

velocity variable 144

Vertex Selection mode, Blender 343

vertSpeed variable 183

viewpoints

overview 3334

top-down view of scenes 281

visualizing movement programming 34

volume

controlling 271273

volume control UI 263265

Vorbis 256, 268

VR (Virtual Reality) 312

W

WaitForSeconds( ) method 234

walking, adjusting components for 4749

walls

colliding with 132133

inner 2931

outer 2931

placing in platformer games 129

WanderingAI script 62, 63, 279

WeatherController script 229

weather data

downloading from internet services 231242

parsing JSON 239241

parsing XML 237239

requesting HTTP data using coroutines 234237

scenes based on 241242

WeatherManager class 231

web, building games for 313318

building games embedded in web pages 315

communicating with JavaScript in browsers 315318

Unity Player vs. HTML5/WebGL 313

WebLoadingBillboard script 245, 246

web servers, posting data to 248251

sending post requests 249250

server-side code in PHP 250251

whiteboxing 7780

drawing floor plans 7879

laying out primitives according to plans 7980

overview of 78

World Space setting 150

WWWForm object 249

X

Xcode project 320

XML (eXtensible Markup Language), parsing 237239

Y

yield keyword 56, 60