using UnityEngine;
using System.Collections;
public class MyButtonData : MonoBehaviour
{
private int _intValue = -1;
public int ButtonIntValue
{
get { return _intValue; }
set { _intValue = value; }
}
void OnClick()
{
MyMainClass.ButtonHandlerFunction(ButtonIntValue);
// or get an instance to a gameobject and call the appropraite class method
}
}