Area2d get_overlapping_bodies gives different output before and after export.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By behelit
:warning: Old Version Published before Godot 3 was released.

Hello! I’m starting to wrap my head around Area2d and it seems to be the perfect type of collision detection for my game. However, I’m running into a weird issue. Before export, the output of get_overlapping_bodies when touching a wall is always [TileMap:680]. However, after export, the value changes and it breaks my script. Three questions:

  1. Why is this happening?
  2. Is there a way to force consistent output before and after export?
  3. Is there a way to detect an object’s group name with Area2d?
:bust_in_silhouette: Reply From: behelit

I never really got an answer to my first 2 questions, there doesn’t seem to be a good reason for changing the object references after export… However, I was able to do what I wanted with print(area.get_name()), which allowed me to identify objects uniquely if I rename all the Area2D’s. They should really add a signals section to the official game documentation, it’s not obvious how it works until you start getting your hands dirty.