Questions about coroutine and uGUI events

Hi uGui devs!

I made a jpg for a better comprehension, but i wrote also my questions below :

I want to use a custom function “public IEnumerator FadeInScene()”, with OnClick() event. When i put the script on the OnClick() object field, Unity doesn’t propose this function. Is it possible to call an IEnumerator function, or use StartCoroutine with the function field? For the moment, i created an additional void function which call IEnumerator function by StartCoroutine. It works, but i find easier to call IEnumerator function directly in Inspector.

Another question : Is it possible to wait a moment before calling others events? For example, switch between 2 UI after a fadein scene (which lasts 1 second)

Thanks for answers

All the events are invoked simultaneously. The order is undefined. The UnityEvents are implemented on top of regular delegates, so have the same limitations.

Thanks for the quick answer!