OnTriggerEnter doesn't work

This is my script

#pragma strict
function OnTriggerEnter (collisionInfo : Collider) 
{
	if(collisionInfo.tag == "Player") 
	{
		Debug.Log("Test");
		Application.LoadLevel("Level01");
	}
}

My player has Polygon 2d collider, rigidbody 2d and has tag name Player
My enemy has Box Collider with Is Trigger checked and the script
I can’t find the problem :/, its not printing the debug log nor loading the other level.

If the script is attached to the enemy and the enemy has isTrigger checked than thats your problem. You change OnTriggerEnter to OnColliderEnter. because right now it will only run that if your enemy goes into a trigger.

EDIT: I changed the function and its working. The previous function was for 3d colliders this one is for 2d:

function OnTriggerEnter2D(collisionInfo : Collider2D)