I am using a tilemap to generate a random map in code. The function set_cell() worked for placing atlas tiles, but for packed scenes it doesn't seem to be working. I have only the layer 0 and a packedscene in my tileset with the id 2. So calling:

set_cell(0, Vector2i(0,0), 2, Vector2i(0,0))

Should place an instance of my scene at position (0,0).
But it doesn't.
What could the problem be ?

What's the compositional structure of your packed scene? How are you loading and instancing the packed scene? For good feedback please share more details.

    Megalomaniak I am not loading and instancing my scene, I am using tilemap2D's new feature, with which you can not only place/duplicate textures, but also whole scenes. I have a tilemap, with a tileset with an atlas and a packedscene tile, with an id : 2. The scene is a characterBody2D with some child nodes. I can place tiles of it manually, and the scene will work with no problems, but the problem is when doing that through code. Nothing happens.

    2 years later

    This is how I use it <iframe width="560" height="315" src="" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>