Skip to content

Migrate into your project

Use this when you want city-builder systems inside a project you already have, instead of extending the standalone FAB template.

flowchart LR
  FAB["FAB template project"] --> Migrate["Asset Actions → Migrate"]
  Migrate --> Target["Your project Content/"]
  Target --> Collision["Add GenericBuilding + GenericRoad channels"]
  Collision --> Maps["Set GameInstance + maps"]
  Maps --> Play["Play migrated DemoMap"]

Assume your project lives at C:/Projects/MyGame/.

  1. Open the City Builder Template FAB project.
  2. In Content Browser, select the folder CityBuilderTemplate.
  3. Right-click → Asset Actions → Migrate → choose C:/Projects/MyGame/Content/.
  4. Confirm the dependency list (includes meshes, materials, widgets, and Misc/ST_CityBuilderTemplate).

Minimum folder:

Content/CityBuilderTemplate/
├── Blueprints/ (all subfolders)
├── Maps/ (DemoMap, MainMenu — optional but recommended)
├── Meshes/
├── Materials/
├── Textures/
├── Misc/
└── 1_BP_CBT_Tut_* … (optional in-editor tutorials)

Merge into your project’s Config/DefaultEngine.ini:

[/Script/EngineSettings.GameMapsSettings]
GlobalDefaultGameMode=/Game/CityBuilderTemplate/Blueprints/BP_CBT_GameMode.BP_CBT_GameMode_C
GameInstanceClass=/Game/CityBuilderTemplate/Blueprints/BP_CBT_GameInstance.BP_CBT_GameInstance_C

Point EditorStartupMap / GameDefaultMap at migrated maps or your own menu that calls BP_CBT_GameInstance.

[/Script/Engine.CollisionProfile]
+DefaultChannelResponses=(Channel=ECC_GameTraceChannel1,Name="GenericBuilding",DefaultResponse=ECR_Overlap,bTraceType=False,bStaticObject=False)
+DefaultChannelResponses=(Channel=ECC_GameTraceChannel2,Name="GenericRoad",DefaultResponse=ECR_Overlap,bTraceType=False,bStaticObject=False)
+Profiles=(Name="GenericBuilding",CollisionEnabled=QueryAndPhysics,ObjectTypeName="GenericBuilding",CustomResponses=,HelpMessage="Collision Preset for all generic building types.",bCanModify=True)
+Profiles=(Name="GenericRoad",CollisionEnabled=QueryAndPhysics,ObjectTypeName="GenericRoad",CustomResponses=,HelpMessage="Collision Preset for all generic road types.",bCanModify=True)

Or create GenericBuilding and GenericRoad object channels in Project Settings → Collision.

Without these channels, Internal_CheckNearRoad and placement traces fail silently.

The template .uproject enables:

PluginRequired for
GuidedTutorialsIn-editor *_Tut_* tutorial assets
ModelContextProtocolOptional — editor MCP tooling

Enable GuidedTutorials in your target project if you migrated tutorial assets.

Copy relevant action/axis mappings from the template Config/DefaultInput.ini or merge into your Enhanced Input setup:

  • PrimaryClick, SecondaryClick, Delete
  • MoveForward, MoveRight, CameraRotate
  • CameraZoomIn, CameraZoomOut
  • BuildingRotateLeft, BuildingRotateRight
  • PauseGame

BP_CBT_PlayerPawn expects these legacy action names unless you rebind in the controller.

  1. Migrate content (above).
  2. Open migrated CityBuilderTemplate/Maps/DemoMap (or duplicate to Content/MyGame/Maps/CityTest).
  3. World Settings:
    • Game Mode OverrideBP_CBT_GameMode
  4. Ensure the level contains:
    • BP_CBT_Grid
    • BP_CBT_Singleton
    • BP_CBT_TimeOfDay
    • BP_CBT_PlayerController / BP_CBT_PlayerPawn spawn (game mode default pawn)
  5. Press Play — place a road and BP_CBT_House.
ApproachSteps
Sub-levelKeep city in DemoMap; open as sub-level from your hub map via BP_CBT_GameInstance → OpenLevel
Mode switchSet your menu Game Instance to BP_CBT_GameInstance only on city levels
Systems onlyMigrate Blueprints/ without maps; place Grid, Singleton, and TimeOfDay in your own level

Default slot name CityBuilderSaveGame is defined in BP_CBT_ObjectMacros / GetSaveGameSlotNameAndIndex.

Rename only if you change it in one place and update WBP_MainMenu + WBP_PlayerHUD save buttons.

IssueFix
Buildings won’t placeCheck GenericRoad overlaps and bIsNearRoad
HUD missingBP_CBT_PlayerController must create WBP_PlayerHUD
Save failsConfirm BP_CBT_SaveGame class on game instance
Wrong map on launchUpdate GameMapsSettings in DefaultEngine.ini
Grid misalignedMatch BP_CBT_PlayerController → Grid Size and BP_CBT_Grid → Default Grid Size to level scale