OnTriggerEnter2D being called, but not OnTriggerExit2D?

I want to increment the player’s score when they successfully clear a box. To do this, I have one collider on the box for collisions, and one trigger over the box to see if the player is on top of it.
[19391-screen+shot+2013-12-15+at+11.51.37+am.png|19391]

I have this script attached to the player to increment the score:

	public int score = 0;

	void OnTriggerExit2D(Collider2D col){
		if (col.gameObject.tag == "Obstacle")
						score++;
	}  

OnTriggerExit2D does not get called in this script, but if I change it to OnTriggerEnter2D it does. I cannot use that, because it constantly increments the score while the player is in the trigger. How can I fix this?

the 2d trigger stuff seems to be having issues. one way around it would be to have a empty game object with a boxcollider2d as a trigger just above and do an oncollisionenter2d for that tag to do your score.

can move GameObject(MoveObject) add Rigidbody2D component and Box Collider2D, other one GameObject(targetObject) add Box Collider2D setting [isTrigger true]
look my pictures…


23332-2.png

the Test4 script code:

void OnTriggerEnter2D(Collider2D collisionInfo) {
	Debug.LogError(" OnTriggerEnter2D  ");
}

void OnTriggerExit2D(Collider2D collisionInfo) {
	Debug.LogError(" OnTriggerExit2D  ");
}