I can't trigger OnTirggerExit2D(Collider2D)!!

I want to use trigger function. but i can’t.

Ironically, onTriggerEnter2D( collider2d ) and onTriggerStay2D( collider2d ) are working!

this is my code.
i want to control by collider’s position.

using UnityEngine;
using System.Collections;

public class ButtonUI : MonoBehaviour
{
	public Vector2 resolution = new Vector2( UI.DEFALUT_SCREEN_WIDTH, UI.DEFALUT_SCREEN_HEIGHT );
	public GUIStyle style;
	public GUIContent content;
	public Vector2 position;
	public Vector2 size;
	Rect rect;

	bool collisionState = false;
	string message;

	public BoxCollider2D collider;

	void Start ()
	{
		this.rigidbody2D.gravityScale = 0.0f;

		rect = UI.getAbsoluteUIRect( position, size, resolution );
		collider.size = size;
		collider.center = rect.center;
	}

	void Update ()
	{	
	}

	void OnGUI()
	{
		GUI.Button( rect, content, style );

		if( collisionState == true )
		{
			GUI.Box( rect, message );
		}
	}


	void OnTriggerStay2D( Collider2D collider )
	{
		if( collider.gameObject.tag == "UI" )
		{
			collisionState = true;
			message = "stay";
			print( message );
		}
	}

	void OnTriggerExit2D( Collider2D collider )
	{
		if( collider.gameObject.tag == "UI" )
		{
			collisionState = false;
			message = "exit";
			print( message );
		}
	}

	void OnTriggerEnter2D( Collider2D collider )
	{
		if( collider.gameObject.tag == "UI" )
		{
			collisionState = true;
			message = "enter";
			print( message );
		}
	}
}

public class HandUI : MonoBehaviour
{
	public GUIStyle style;
	public GUIContent content;
	public float radius;
	Rect rect;

	public CircleCollider2D collider;

	void Start ()
	{
		collider.radius = radius;
		collider.center = rect.center;	
	}

	void Update ()
	{
		rect = new Rect( Input.mousePosition.x - 50, Screen.height - Input.mousePosition.y - 50, radius * 2, radius * 2 );

		collider.center = rect.center;
	}

	void OnGUI()
	{
		GUI.Button( rect, content, style );
	}
}

Are you sure the object is leaving the trigger or are you deleting it ?

If you are deleting the object instead of moving it away, OnExit won’t trigger since you won’t be able to find the tag of a destroyed object.

Check if is trigger of your box collider is true. If it is, then check if your trigger or other collider has a rigid body. According to Unity Script reference, either the trigger or the other collider should have a rigidbody. If you are planning to make UIs with triggers, it will be better to use:

RaycastHit2D hit = Physics2D.Raycast(Camera.main.ScreenToWorldPoint(Input.MousePosition), Vector2.zero);
if(hit != null)
{
    //your code here
}