Why none of the events OnTriggerEnter or OnCollisionEnter not fire ?

The script is attached to a GameObject a cylinder.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class EnemyAttack : MonoBehaviour {

    public bool entered = false;

    private void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.name == "Enemy")
            entered = true;
    }

    private void OnCollisionEnter(Collision collision)
    {
        if (collision.gameObject.name == "Enemy")
            entered = true;
    }

    private void OnCollisionExit(Collision collision)
    {
        entered = false;
    }
}

“Enemy” is the GameObject and that should be detected once it’s entering the GameObject this script is attached to.

Entering or Collide with. But it doesn’t matter none of the events work. I used a breakpoint and it’s never get any of the events.

Does this cylinder or the Enemy GameObject have a RigidBody attached?

Note from OnTriggerEnter docs:

Trigger events are only sent if one of the colliders also has a rigidbody attached.

Note from OnCollisionEnter docs:

Collision events are only sent if one of the colliders also has a non-kinematic rigidbody attached.

Hope this helps.