Search Unity

Add errorReceived callback for VideoPlayer

Discussion in 'Scripting' started by shoo, Aug 10, 2017.

  1. shoo

    shoo

    Joined:
    Nov 19, 2012
    Posts:
    60
    Hello, I am trying to add errorReceived callback, but it ask me for return something inside ErrorEventHandler delegate.

    I am doing like this:
    Code (CSharp):
    1.     VideoPlayer.ErrorEventHandler ErrHandler(VideoPlayer source, string msg)
    2.     {
    3.        
    4.     }
    And then:
    Code (CSharp):
    1. vplayer.errorReceived += ErrHandler;
    But it doesn't work. I have no so much experience about working with delegates and events. So how could I do it properly for listening for vplayer errors?
     
unityunity