Q:

Unity collider OnTriggerEnter not getting called

I've made many colliders before and that I used was (collider otherOnTriggerEnter(collider other)) and then check if the other collider is the one I want by comparing TAG.  But this time I'm not triggering the canMelee boolean.  My code:
ArrayList Enemy;
public StatData stat;

[SerializeField]
private bool canMelee = false;

/// <summary>
/// OnTriggerEnter is called when the Collider other enters the trigger. 
/// </summary>
/// <param name="other">The other Collider involved in this collision.</param>
void OnTriggerEnter(Collider col)
{
    if (col.tag == "Enemy")
    {
        Debug. Log("Now you can do melee attack!"); 
        canMelee = true;
    }
}

So I wrote this code but somehow this doesn't work I checked the tag and added it to the player game object but it still doesn't work. 
I tried to add another debug to check if OnTriggerEnter() is happening just above the if branch : Debug. Log("Triggered"); and it gets triggered. 
I can't just figure put what's wrong.  Please help me. 

A:

First double check that your enemy game objects have the tag "Enemy".  Next make sure that your player collider has the "Is Trigger" option selected in the Unity inspector.  
Next try using 
col.gameObject. CompareTag("Enemy")
instead of: col.tag == "Enemy" in your if statement.  
Check out the Unity documentation as well on Colliders:
Unity Collider documentation
Unity Component. CompareTag method with example
Hope this helps!