I know that Start can be coroutine. Can any other monobehaviour function be coroutines?
Non exhaustive list
Functions that can be a coroutine
• Start
• OnApplicationFocus (in editor at least, to be confirmed on build)
• OnApplicationPause (to be confirmed)
• OnCollisionEnter(2D)
• OnCollisionExit(2D)
• OnCollisionStay(2D) (Strange, but tested)
• OnTriggerEnter(2D)
• OnTriggerExit(2D)
• OnTriggerStay(2D)
• OnBecameVisible
• OnBecameInvisible
• OnMouseDown
• OnMouseDrag
• OnMouseEnter
• OnMouseExit
• OnMouseOver
• OnMouseUp
• OnTransformChildrenChanged
• OnTransformParentChanged
• OnWillRenderObject
• OnPreCull
• OnPreRender
• OnPostRender
Functions that can NOT be a coroutine
• Awake
• OnEnable
• Update
• FixedUpdate
• LateUpdate
• OnDisable
• OnDestroy
• OnDrawGizmos
• OnDrawGizmosSelected
• OnGUI
• OnMouseUpAsButton
• OnValidate
• Reset
• OnRenderObject
If you’re using Visual Studio with intellisense, in a new monobehaviour script, type IEnumerator leave a space and see the auto complete options for the names. Most of them will be On something methods like OnApplicationEnter or OnCollisionEnter2D etc. Generally, it seems to be methods that are attached to an event e.g. OnMouseDown, with the inclusion of the Start method. Hope that clarifies. @pingleconsoledeveloper