How do I clear all gameobjects placed on a tilemap?

If I call the following on a tilemap:

myTilemap.ClearAllTiles();

It clears all tiles placed using the tilemaps built in system. But if I’ve placed any tiles via the gameobject brush, they don’t get cleared.

What are my best options for working with the objects placed relative to a tilemap? Is there any kind of hard connection made between the tilemap and the objects that I can leverage, or are the objects simply placed relative to the map?

Is there any kind of API I should be referencing when working with gameobjects placed “on” / “using” a tilemap?

(Also posted on gamedev.)

Is there any kind of hard connection made between the tilemap and the objects that I can leverage, or are the objects simply placed relative to the map?

No, the gameobject brush merely leverages the 2D tilemap grid to pick a position and clone (instantiate) a gameobject at that position as a child of the currently selected tilemap. It does not create a Tile asset in your project folder (which is what happens when you paint a 2D sprite using the default brush).

You can select the tilemap in the hierarchy and, in the inspector, you can click on the info dropdown and see that there are no tiles in the tilemap.

Is there any kind of API I should be referencing when working with gameobjects placed “on” / “using” a tilemap?

You should just use the regular Transform API. So… tilemap.gameObject.transform.blahblah