Skip to content

Instantly share code, notes, and snippets.

@nbro
nbro / SYourLandscapeModule.cpp
Created April 25, 2026 02:35 — forked from luttje/SYourLandscapeModule.cpp
Unreal Engine 5 - Programatically create a landscape with spline points and segments
#include "LandscapeSubsystem.h"
#include "LandscapeComponent.h"
#include "LandscapeSplineActor.h"
#include "LandscapeSplinesComponent.h"
#include "LandscapeSplineControlPoint.h"
#include "Editor/LandscapeEditor/Private/LandscapeEdMode.h"
// Source: https://forums.unrealengine.com/t/creating-a-lanscape-using-c-or-the-python-api/504997/4
ALandscape* CreateLandscape(const FTransform& LandscapeTransform, const int32& SectionSize, const int32& SectionsPerComponent, const int32& ComponentCountX, const int32& ComponentCountY)
{