'Unity is not showing public methods in the event field 2022

I have 2 mostly identical public methods in the script, but only first one can be shown in the inspector, what happened?

public void playDeadAnim() {
    Rigidbody[] allRB = GetComponentsInChildren<Rigidbody>();
    for (int r=0;r<allRB.Length;r++) {
        allRB[r].isKinematic = false;
    }
     myAnimator.enabled = false;
}

public void respawnEnemy() {        
    Rigidbody[] allRB = GetComponentsInChildren<Rigidbody>();
    for (int r=0;r<allRB.Length;r++) {
        allRB[r].isKinematic = true;
    }
    myAnimator.enabled = true;
}

the method "respawnEnemy" not shown in the inspector



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source