Not compile function ALandscapeProxy::UpdateBakedTextures()

wanted to remodel grass in landscapes during the game.
here is what I wrote:

#include "LandscapeProxy.h"
#include "GameFramework/Actor.h"
#include "rClimatManager.generated.h"
UCLASS()
class HUMANMOUNT_API ArClimatManager : public AActor
{
	GENERATED_BODY()
public:	
	ArClimatManager();
protected:
	virtual void BeginPlay() override;
public:	
	virtual void Tick(float DeltaTime) override;
	 UFUNCTION(BlueprintCallable) void UpdateLandscape(ALandscapeProxy* TereinLandscape){
	     if(TereinLandscape){ TereinLandscape->UpdateBakedTextures(); }
	} 
};

thought to make a function wrapper, but still it went wrong and visual studio no compiles
output text:

Creating library G:\ProjectUnreal\HumanMount 4.21 - 2 4.22\Intermediate\Build\Win64\UE4Editor\Development\HumanMount\UE4Editor-HumanMount-0011.suppressed.lib and object G:\ProjectUnreal\HumanMount 4.21 - 2 4.22\Intermediate\Build\Win64\UE4Editor\Development\HumanMount\UE4Editor-HumanMount-0011.suppressed.exp
1>Module.HumanMount.cpp.obj : error LNK2019: unresolved external symbol "public: void __cdecl ALandscapeProxy::UpdateBakedTextures(void)" (?UpdateBakedTextures@ALandscapeProxy@@QEAAXXZ) referenced in function "public: void __cdecl ArClimatManager::UpdateLandscape(class ALandscapeProxy *)" (?UpdateLandscape@ArClimatManager@@QEAAXPEAVALandscapeProxy@@@Z)
1>Module.HumanMount.gen.5_of_6.cpp.obj : error LNK2001: unresolved external symbol "public: void __cdecl ALandscapeProxy::UpdateBakedTextures(void)" (?UpdateBakedTextures@ALandscapeProxy@@QEAAXXZ)
1>Module.HumanMount.gen.5_of_6.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class UClass * __cdecl Z_Construct_UClass_ALandscapeProxy_NoRegister(void)" (__imp_?Z_Construct_UClass_ALandscapeProxy_NoRegister@@YAPEAVUClass@@XZ) referenced in function "void __cdecl `dynamic initializer for 'public: static struct UE4CodeGen_Private::FObjectPropertyParams const Z_Construct_UFunction_ArClimatManager_UpdateLandscape_Statics::NewProp_TereinLandscape''(void)" (??__E?NewProp_TereinLandscape@Z_Construct_UFunction_ArClimatManager_UpdateLandscape_Statics@@2UFObjectPropertyParams@UE4CodeGen_Private@@B@@YAXXZ)
1>G:\ProjectUnreal\HumanMount 4.21 - 2 4.22\Binaries\Win64\UE4Editor-HumanMount-0011.dll : fatal error LNK1120: 2 unresolved externals
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5): error MSB3075: The command ""C:\Program Files\Epic Games\UE_4.22\Engine\Build\BatchFiles\Build.bat" HumanMountEditor Win64 Development -Project="G:\ProjectUnreal\HumanMount 4.21 - 2 4.22\HumanMount.uproject" -WaitMutex -FromMsBuild" exited with code 5. Please verify that you have sufficient rights to run this command.

Your ALandscapeProxy class needs to have an UpdateBakedTextures function.

Add

public:
void UpdateBakedTextures();

In LandscapeProxy.h (inside the class). Then add

void ALandscapeProxy ::UpdateBakedTextures()
{
    // add the code you want here
}

In LandscapeProxy.cpp.

ALandscapeProxy it’s an engine class in it and so is the function UpdateBakedTextures()

Hi Velmir, you are getting a linker error because you need to add a dependency for the “Landscape” module in your Build.cs file.
Unfortunately this module seems to be editor only, so you won’t be able to use it in a packaged build at runtime.

thanks for the reply.
Of course, it is a pity that in the standard assembly I will not be able to do this.