I have this code for my game instance c++ class and i get unresolved external symbols error:
.h file:
#include "CoreMinimal.h"
#include "Engine/GameInstance.h"
#include <Blueprint/UserWidget.h>
#include <Engine/GameViewportClient.h>
#include "MyGameInstance.generated.h"
UCLASS()
class MYPROJECT_API UMyGameInstance : public UGameInstance
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable, Category = "Da")
void ShowLoadingScreene(UUserWidget *Widget, int32 a);
};
.cpp file:
#include "MyGameInstance.h"
#include <Blueprint/UserWidget.h>
#include <Engine/GameViewportClient.h>
void UMyGameInstance::ShowLoadingScreene(UUserWidget *Widget, int32 a)
{
Widget->AddToViewport(a);
}
Can somebody help me please?