public void OnPointerClick(PointerEventData eventData) { ValueList v = obj.GetComponent <ValueList> (); if (isAdd) { v.AddValue(); } else { v.SubValue(); } }