Tilemap Component does not load at launch?

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.

2 Likes