How can I make enemy detect and jump over tilemap obstacle?

Start with tutorials, first to detect the obstacle.

Raycasting, overlap testing, tile map checking, all of these things and more are valid approaches.

Another way is to author pre-made “jump links” for each obstacle, jump links that the enemy encounters and uses as a guideline to navigate the obstacle.

Once you have detected the object, hop the enemy over, either with your own trajectory / jump code, or else use a Tweener like DOTween or iTween or whatever.

If you’re not able to sort it out from a full purpose-built video tutorial, you certainly won’t be able to get much from this little tiny text-only box.

Two steps to tutorials and / or example code:

  1. do them perfectly, to the letter (zero typos, including punctuation and capitalization)
  2. stop and understand each step to understand what is going on.

If you go past anything that you don’t understand, then you’re just mimicking what you saw without actually learning, essentially wasting your own time. It’s only two steps. Don’t skip either step.

Imphenzia: How Did I Learn To Make Games: