Skip to content

Instantly share code, notes, and snippets.

@celoron
Last active December 25, 2016 23:16
Show Gist options
  • Select an option

  • Save celoron/502082e47f03d80f3766a7aeb4d72f20 to your computer and use it in GitHub Desktop.

Select an option

Save celoron/502082e47f03d80f3766a7aeb4d72f20 to your computer and use it in GitHub Desktop.
Unity Event Invoke
using UnityEngine;
using UnityEngine.EventSystems;
public class UnityEventInvoke : MonoBehaviour {
public EventTrigger.TriggerEvent onClick;
void Start() {
BaseEventData eventData = new BaseEventData(EventSystem.current);
onClick.Invoke(eventData);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment