Unity Buat tombol dengan parameter
int j = 5;
someGameObject.GetComponent<Button>().onClick.AddListener(delegate {myFunction(j); });
SvenVH
int j = 5;
someGameObject.GetComponent<Button>().onClick.AddListener(delegate {myFunction(j); });