SetActive(true) dont work

Hi! Its code work, after collision game object deactivated

void OnTriggerEnter2D (Collider2D col) {
		if (col.gameObject) 
		{
			col.gameObject.SetActive(false);
		}
	}

but this code dont work, why?

void OnTriggerEnter2D (Collider2D col) {
	if (col.gameObject) 
	{
		col.gameObject.SetActive(true);
	}
}

how to have it to activate game object?

Sorry for my English and thanks for your help

SetActive(false) disables the gameObject, which result in inactive update, ontrigger and all other update methods, so you will not be able to check anything from that gameobject updates such as collison and so on.
This is a very old question and has been answered hundreds of times.
Just do a quick google search and you will have tons of answers.

https://www.google.lv/search?q=unity+setactive+doesnt+work&ie=utf-8&oe=utf-8&gws_rd=cr&ei=BcmhVPWnEcj8ygOx04GICw#q=unity+setactive+doesn't+work&spell=1

cheers

Here is how you do it:

GameObject object;

void Start()
{
   // this will set an instance of the gameobject to your variable
   object = GameObject.Find("Your object's name");
}

you can now use that GameObject variable to activate/deactivate at any time.