public delegate void VideoFirstEnd(); public delegate void VideoSecondEnd(); public VideoFirstEnd m_OnEnd1; public VideoSecondEnd m_OnEnd2;
前兩句是申明delegate,ide
後面兩句是定義兩個變量spa
m_UIManager.GetComponent<UIRoot>().m_OnEnd1 += Video1PlayEnd;
m_UIManager.GetComponent<UIRoot>().m_OnEnd2 += Video2PlayEnd;
用起來是這樣code