-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.cs
35 lines (26 loc) · 883 Bytes
/
test.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class test : MonoBehaviour {
// Use this for initialization
void Start () {
NotificationCenter.DefaultCenter().AddObserver(this, "ABBB");
}
// Update is called once per frame
void Update () {
}
void ABBB( Notification notification)
{
Debug.Log("Received notification from: " + notification.sender);
if (notification.data == null)
Debug.Log("And the data object was null!");
else
{
Debug.Log("And it included a data object: " + notification.data);
Debug.Log(notification.name);
GameObject b = (GameObject)notification.data;
Debug.Log(b.transform.position);
}
}
}