Important Notice:

On July 31st, 2017 the Digital-Tutors library will be retired along with Digital-Tutors concurrent licensing. Effective August 1, 2017 any active group plans will be redirected to www.pluralsight.com. Each group plan will receive one individual user license on Pluralsight for each paid Digital-Tutors license. Please contact your account representative for any additional questions.
When to use Notification Center vs. other methods
See Details
Chris Glick

Pluralsight

Chris Glick
In this Unity tutorial, we’ll learn various ways our scripts can access and talk to each other. We'll begin the tutorial by learning about all the built-in methods Unity gives us to talk between scripts and between objects. We'll learn the how to find and access scripts on any game object using either direct connections, finding the object or the physics system. Finally we'll examine how a script can call methods on many other scripts using the messaging system in Unity. Each of these methods has limitations, so next we'll introduce the 3rd party script 'Notification Center' which acts as a central hub for easily communicating between multiple scripts. We'll learn how to post a new notification, how to observe a notification and how to pass data through the Notification Center. We'll wrap everything up by examining each of these methods and discuss which we should use in various situations. Understanding how our scripts will talk to each other lets us break our game into many script components, while still creating the functionality we need with the least amount of effort.
Introduction and project overview
1

Introduction and project overview

 
01:05
Overview and limitations of built-in communication methods
2

Overview and limitations of built-in communication methods

 
09:12
Component to Component communication on the same object
3

Component to Component communication on the same object

 
09:05
Communication on other objects using the Inspector
4

Communication on other objects using the Inspector

 
08:33
Finding objects and components at run-time
5

Finding objects and components at run-time

 
08:15
Collisions with SendMessageUpwards and BroadcastMessage
6

Collisions with SendMessageUpwards and BroadcastMessage

 
09:51
Notification Center and the Publish Subscribe design pattern
7

Notification Center and the Publish Subscribe design pattern

 
08:52
Sending and Receiving a notification
8

Sending and Receiving a notification

 
07:16
Having multiple scripts receive a notification
9

Having multiple scripts receive a notification

 
02:52
Sending data with the notification function
10

Sending data with the notification function

 
07:07
How to cast our notification data with other variables
11

How to cast our notification data with other variables

 
06:22
When to use Notification Center vs. other methods
12

When to use Notification Center vs. other methods

 
07:12