Skip to content

Instantly share code, notes, and snippets.

@MarshMello0
Created April 2, 2019 10:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarshMello0/f6dfcdac437ebfb2499de085a5c33a3f to your computer and use it in GitHub Desktop.
Save MarshMello0/f6dfcdac437ebfb2499de085a5c33a3f to your computer and use it in GitHub Desktop.
[Unity] This is by own script I made so that I can add a button mechanic to the textmeshpro text
using UnityEngine;
using UnityEngine.EventSystems;
public class TMPButton : MonoBehaviour, IPointerClickHandler
{
public EventTrigger.TriggerEvent callBack;
public void OnPointerClick(PointerEventData eventData)
{
callBack.Invoke(eventData);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment