I copied my project from Unity 4 to Unity 5. OnTriggerStay is no longer working -- what changed?

As the title says, I switched from Unity 4 to Unity 5. Everything works except for one thing: I have an OnTriggerStay function that is no longer called when my capsule collider enters a sphere collider. I have the project open in two windows: one is Unity 4, and it works, and one is Unity 5 and it doesn’t work. So I’m assuming the way you would handle that type of stuff has changed. Can someone fill me in? Let me know if you need more info.

Update: changing the function from OnTriggerStay to OnTriggerEnter makes it get called. Unfortunately, I need OnTriggerStay, which seems to have been messed with. Can’t find anything about it in the release notes. I’m on 5.1

now i am working in Unity 5… i am using OnTriggerStay function its working fine…

maybe it will be help you…

#pragma strict

function OnTriggerStay(other : Collider){
if(other.tag == "MovingBridge"){
transform.parent = other.transform;
}
}

function OnTriggerExit(other : Collider){
if(other.tag == "MovingBridge"){
transform.parent = null;
}
}

remove both collider and add again in Unity 5…

Just in case anyone else gets stuck on this issue the problem is related to the following bug:

To further note, it appears that
adding a rigidbody to the OnTrigger
scripted object allows OnTriggerStay
events to be called even when its
parent object has a rigidbody.

This does not work:
→ Parent (has rigidbody)
—> Child (has OnTrigger script)

This works:
→ Parent (has rigidbody)
—> Child (has rigidbody, OnTrigger script)

Adding a blank OnTriggerStay method to the parent also will surfice

public void OnTriggerStay(Collider other)
{
	// Unity needs this method here
}