Skip to content

Instantly share code, notes, and snippets.

@leducanhh
Created April 17, 2017 04:44
Show Gist options
  • Save leducanhh/8ff8d639d3a60c3f9a00b033f95f83f7 to your computer and use it in GitHub Desktop.
Save leducanhh/8ff8d639d3a60c3f9a00b033f95f83f7 to your computer and use it in GitHub Desktop.
using UnityEngine;
using System.Collections;
public class ButtonManager : MonoBehaviour
{
//---this function has been assigned to (Button)YourButtonUI
public void OnHandleUndoEvent()
{
//---this is a solution to get YourButtonUI gameObject
var go = EventSystem.current.currentSelectedGameObject;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment