← SEARCHABLE ARCHIVE
Unreal Engine · 2026-07-12

Why are hexagonal tiles composed of StaticMesh?

ProceduralMesh is not always needed

INTERACTIVE READING MODE →

The articles written on this blog were created with the goal of teaching. Also, the information in the article may be incorrect, so please be careful.

Hexagonal tiles can also be calculated directly at runtime and made into a ProceduralMesh. However, if the shape is fixed, there is no reason to create vertices and indices every time.

ProjectTB displays tilesUStaticMeshComponentChanged to base.

UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
TObjectPtr<UStaticMeshComponent> TileMesh;

UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
TObjectPtr<UStaticMeshComponent> TileOutlineMesh;

UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
TObjectPtr<UStaticMeshComponent> CenterIconMeshComponent;

When StaticMesh is suitable

  • The tile shape does not change while running.
  • Reuse the mesh and LOD created in the editor.
  • Conflicts and Material Slots are managed in assets.
  • Multiple tiles share the same mesh.

ProceduralMesh is meaningful when the terrain itself is transformed or when shapes are created with user input. StaticMesh is simpler when you simply change the size and color of fixed hexagons.

Separate visual state and game rules

bool bIsMovementRangeHighlighted = false;
bool bIsAttackRangeHighlighted = false;

void SetRangeHighlights(
    bool bMovement,
    bool bAttack,
    FLinearColor MovementColor,
    FLinearColor AttackColor
);

Grid rules determine whether movement is possible, and the tile changes its material color according to the result. Just because there is a Mesh Component, there is no need to include path navigation in the tile Actor.

If the number of tiles becomes much larger, the number of Actors and Components itself can become a burden. At that stage, the direction of binding to InstancedStaticMesh or HierarchicalInstancedStaticMesh should be reviewed.