Answers for "delegates in UnityC#"

C#
1

unity delegate

Button.onClick.AddListener(delegate { Function(variable); });
Posted by: Guest on May-07-2021
0

delegates in UnityC#

public delegate void myDelegate();
public myDelegate Del;
 void start()
{
 Del = () => { Debug.log(" Hello there"): };
}
void Update()
{
 if(Input.getkeydown(keycode.space))
      Del();
}
Posted by: Guest on August-28-2021

C# Answers by Framework

Browse Popular Code Answers by Language