I have the following code, taken from a Unity script to play video:
public delegate void VideoEnd();
public VideoEnd OnEnd;
Then, when a video ends, the following event is generated:
if (OnEnd != null)
OnEnd();
What I need, is (not if you declare, or what would be the name of what I want to do) assign OnEnd the Stop () function, that is, when the delegate event occurs, generate a stop What is the correct method to use delegates in this case?