Button.h error

hi,

when i include the button.h file in my header file, i get this error: Info C:\Program Files (x86)\Epic Games\UE_4.16\Engine\Source\Runtime/UMG/Public/Components/Button.h(10): fatal error C1083: Cannot open include file: ‘Components/ContentWidget.h’: No such file or directory

this is how my header file looks.

// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "Runtime/UMG/Public/Components/Button.h"
#include "GamePadFunctions.generated.h"


/**
 * 
 */
UCLASS()
class TESTCPP_API UGamePadFunctions : public UBlueprintFunctionLibrary
{
	GENERATED_BODY()

	UFUNCTION(BlueprintCallable, Category="GamePad Functions")
	void Click();
	
};

thanks in advance,

In your MYGAMENAME.Build.cs file, do you have “UMG” included?

Such as:

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

hi, thanks that worked now i have another problem i will have a UButton as a parameter for my Click function like this void Click(UButton* btn);

but the UButton is undefined.

thanks in advance,

#include “Components/Button.h”