You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// This is useful if for example UI was created later then the player
69
+
Receive(Hub<SignalPlayerCreated>.Last);
70
+
}
71
+
65
72
privatevoidOnEnable()
66
73
{
67
74
// Subscribing to signal
68
-
Hub.Add<SignalPlayerCreated>(this);
75
+
Hub<SignalPlayerCreated>.Add(this);
69
76
}
70
77
71
78
privatevoidOnDisable()
72
79
{
73
80
// Unsubscribing from signal
74
-
Hub.Remove<SignalPlayerCreated>(this);
81
+
Hub<SignalPlayerCreated>.Remove(this);
75
82
}
76
83
77
84
// Receiving the signal
@@ -85,7 +92,7 @@ public class PlayerUI : MonoBehaviour, IReceiver<SignalPlayerCreated>
85
92
86
93
### UnityEvent
87
94
88
-
Create a class that inherits from Listener<```SignalType```> and attach it to any game object you want. Now you can invoke UnityEvent to corresponding Signal.
95
+
Create a class that inherits from `Listener<SignalType>` and attach it to any game object you want. Now you can invoke UnityEvent to corresponding Signal.
0 commit comments