Define GKEvent
public class Clock : MonoBehaviour
{
//Just add GKEvent like how you add UnityEvent
public GKEvent<float> onShowCurrentTime;
void Update(){
//Every 1 second, show the current time
if (Time.time % 1 < 0.01f)
{
//Invoke it by using .Invoke
onShowCurrentTime.Invoke(Time.time);
}
}
}
Last updated