Tilemap Component does not load at launch?

Why tilemap won’t load when launch,** tilemap component** won’t save, tilemap component wont load if you use Open Level from another level for example, they will load correctly if i open the level from the editor, but if i first open a Main Menu level and from there Open Level the map, the tilemap component won’t load, This is a really big problem. This tool is really useful, it’s a shame it does not work correctly.

Do you guys know any workaround? any way to be able to use tilemap component in a reliable way?

Yeah, I’ve had this happen when making an actor with a paper tile map component. Somehow, it’s clearing out the tile map you choose for the component. Here’s a work-around:

Create a new variable of the paper tile map type.
Set the default to the tile map you want to use.
On begin play, add it to the component.

1 Like

Thank you so much, my project completely stop when i could not resolve this problem, but now i can keep working.
When will they care about Paper2D? :C

Thank you again.

I randomly have this problem. I’ll have dozens of tilemap actors in a level and randomly one will exhibit this behavior, and it happens in editor too. I usually just delete the actor and re-add it to the level until it finally stops doing this.

Just to add to this thread…

I’m using 4.26.2 and have experienced the same problem as the original poster.

My setup…

  • TileMap dragged directly into the level
  • Everything worked as it should

Then…

  • Created a Blueprint Actor class, added a PaperTileMap component.
  • Set the TileMap to use (same as the one dragged into the level).

This time…

  • Running the Game level directly, the tilemap was rendered correctly everytime.
  • If, however, I ran the game from the Main Menu, which loaded the Game level when clicking the play button, the tilemap was not displayed.

To test…

  • I added PRINT nodes to both the construction script and event play.
    • The construction script reported the correct tilemap being set.
    • BeginPlay indicated a default empty tilemap being set.

Initialise solution…

  • I added a node after BeginPlay to specifically set the TileMap to use, not ideal, but this did appear to work.

Experimenting further…

  • I created a separate Blueprint class, but this time selected PaperTileMapActor as the class to inherit from, instead of Actor.
  • I removed my original Blueprint actor from the Game level and replaced it with this one
  • It worked perfectly every time, regardless of loading the Game level directly, or from the Main Menu

Noticeable differences…

  • The Blueprint actor class includes a default scene root component, the PaperTileMapActor class does not
  • The PaperTileMapActor has a RenderComponent which it sets at the root.
  • Hovering over this, the description in brackets indicates (RenderComponent) (PaperTileMapComponent).

Everything seems ok when using this approach (at the moment). Hope this is of use to anyone else coming across this issue.

1 Like

Another project fixed, thanks for the info!

I can confirm this is still happening for 5.2.1. And, also I confirm that the issue doesn’t exist for TileMapActor but for TileMapComponent when the component is added to another root component. Just to prove it I also made a setup where I added a TileMapComponent into a TileMapActor. Whenever map opens in editor, TileMapActor’s tilemap stays intact but the child, TileMapComponent’s tilemap always get reset and becomes empty.

I ended up using child actor components to attach multiple TileMapActor’s into an actor. It works all the times. I guess it’s a bit of inefficiency to sacrify, though. But, it works quite well as a workaround.