# Bug: Landscape Grass Takes Forever To Load

**URL:** <https://forums.unrealengine.com/t/bug-landscape-grass-takes-forever-to-load/334386>\
**Category:** World Creation\
**Tags:** unreal-engine, Foliage, Landscape, grass, question\
**Created:** [October 6, 2015, 8:48am UTC](https://forums.unrealengine.com/t/bug-landscape-grass-takes-forever-to-load/334386 "2015-10-06T08:48:46Z")\
**Posts on this page:** 1\
**Showing post:** 18

<div class="post-metadata">

**Author:** ![hejtmy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@hejtmy](https://forums.unrealengine.com/u/hejtmy)\
**Post date:** [November 19, 2021, 1:18pm UTC](https://forums.unrealengine.com/t/bug-landscape-grass-takes-forever-to-load/334386/18 "2021-11-19T13:18:06Z")

</div>

For those coming to this later and not skilled in c++. This is my solution. Create an actor, add it to the scene and assign a landscape which you want to spawn immediately.

You also NEED to add Landscape to your project.Build.cs file, otherwise it will fail to find proper libraries.

### YourProject.build.cs

```
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "Landscape"});)

```

### LFLandscapeGrassHack.h

```
#pragma once

#include "CoreMinimal.h"
#include "LandscapeProxy.h"
#include "GameFramework/Actor.h"
#include "LandscapeGrassHack.generated.h"

UCLASS()
class YOURPROJECT_API ALandscapeGrassHack : public AActor
{
	GENERATED_BODY()
	
public:	
	// Sets default values for this actor's properties
	ALandscapeGrassHack();

	UPROPERTY()
	USceneComponent* Root;

	UPROPERTY(EditAnywhere)
	ALandscapeProxy* Landscape;

protected:
	virtual void BeginPlay() override;

	void UpdateGrass(ALandscapeProxy* LandscapeToUpdate);
};

```

### LandscapeGrassHack.cpp

```
#include "LandscapeGrassHack.h"

ALandscapeGrassHack::ALandscapeGrassHack()
{
	PrimaryActorTick.bCanEverTick = false;	
	Root = CreateDefaultSubobject<USceneComponent>("Root");
	RootComponent = Root;
}

void ALandscapeGrassHack::BeginPlay()
{
	Super::BeginPlay();
	UpdateGrass(Landscape);
}

void ALandscapeGrassHack::UpdateGrass(ALandscapeProxy* LandscapeToUpdate)
{
	if(!IsValid(LandscapeToUpdate))
	{
		UE_LOG(LogTemp, Warning, TEXT("NO landscape has been assigned, cannot recreate grass"));
		return;
	}
	FOccluderVertexArray arr;
	LandscapeToUpdate->UpdateGrass(arr, true);
}

```

---

_[View the full topic](https://forums.unrealengine.com/t/bug-landscape-grass-takes-forever-to-load/334386)._
