c# delegate unity code example Example: unity delegate Button.onClick.AddListener(delegate { Function(variable); });