Skip to content

Instantly share code, notes, and snippets.

@smkplus
Last active April 5, 2020 19:14
Show Gist options
  • Select an option

  • Save smkplus/b49b67e7a379e14e6634968df115d13a to your computer and use it in GitHub Desktop.

Select an option

Save smkplus/b49b67e7a379e14e6634968df115d13a to your computer and use it in GitHub Desktop.
using System;
using UnityEngine;
public class Subject : MonoBehaviour
{
//delegate that stores the list of methods
public static Action onNotify;
private void Start()
{
//Invokes the notificaton method
if (onNotify != null)
{
onNotify.Invoke();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment