Skip to content

Instantly share code, notes, and snippets.

@DataGreed
Created March 10, 2019 13:25
Show Gist options
  • Save DataGreed/02aeee0c7f6cbb82dbfaf9e43acfb54a to your computer and use it in GitHub Desktop.
Save DataGreed/02aeee0c7f6cbb82dbfaf9e43acfb54a to your computer and use it in GitHub Desktop.
Unity: Custom Event handler in script editor panel
using UnityEngine.Events;
//will be displayed in editor
public UnityEvent yourCustomEvent;
public void Foo() {
// Trigger the event!
yourCustomEvent.Invoke();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment