This question was
closed May 03, 2018 at 01:57 PM by
kordou for the following reason:
The question is answered, right answer was accepted
Help with events.
Hi, I am new to envets and i need some help
I want to read the event "started" in my script from VideoPlayer https://docs.unity3d.com/ScriptReference/Video.VideoPlayer.html but I do not know how to program it to my code ?
could someone give me an example on how to read any of this manual invents ?
thanks
Comment
Best Answer
Answer by Hellium · May 02, 2018 at 08:10 AM
The started
event relies on the EventHandler delegate, taking a VideoPlayer
as parameter:
videoPlayer.started += OnVideoStarted ;
// ...
private void OnVideoStarted( VideoPlayer source )
{
Debug.Log( source + " video player started" ) ;
}