Tilemap component created dynamically at runtime not creating collision

So, I’m playing with some Paper2D stuff, and trying to spawn some TileMapComponents dynamically at runtime. I’m doing this by adding a TilemapComponent through the AddPaperTilemapComponent function in an actor, then running the CreateNewTileMap function off the TileMapComponent.

The tilemaps are generated as expected, except there’s no collision happening on the tilemap. For reference, I created a TileMap as a TileMap stand alone class using the same TileSet, and the collision worked fine on that. What am I missing?

For reference, the TileMap stand alone class is in the foreground, with its collision functioning, and the TileMapComponent is in the background with no collision:

Also, the dynamically created TileMapComponent doesn’t show up in the tilemaker actor I’m using to create the component, which I assume is somehow related. Is the component not being registered?

Also for reference, here’s the blueprint code used to generate the TileMap:

I just re-wrote the whole thing in C++, and it seems to be working. Doesn’t really help the whole blueprint situation.

EDIT: That was short lived, the code version stopped working…

Alright… so this is really weird:

It seems that when the TileMapComponent is generated, there is no collision created. However, if I go into the outliner, and select the actual component in the actor that is creating the component, the collision gets created…

Note that there is no collision on the patch closest to camera (I had already selected the other patch that now has collision farthest from camera):

Components in the outliner, unselected:

93112-componentviewer.png

Selected component closest to camera:

93113-selectedcomponent.png

Collision generates:

Any clues???

Hi, I’m aware this is super old so this reply is moreso for the people who are looking for a solution to this or similar problems these many years later:

After setting the ‘Set Tile’ node, you want to use the ‘Rebuild Collision’ node. This seems to have worked and fixed my problem with generating collision for my blueprint-generated tilemap ^.^

Hi! You won’t believe it, but after 8 years, your answer was a godsend. I faced the exact same issue, spent hours on it, and “Rebuild Collision” finally solved it! Just wanted to say thank you from the future!