Hello, Im trying to integrate ActionRPGLoadingScreen (from Epic sample) into my project. I solved some issues (in my project DEFINE_LOG_CATEGORY work in some other way), but then I get problems with RPGBlueprintLibrary. For some reason in RPGBlueprintLibrary.h, it cant get a UBlueprintFunctionLibrary class. I
m new at c++, so maybe I missed something stupid? What am I doing wrong here?
Here is the log:
RPGBlueprintLibrary.h
#pragma once
#include "LoadingSystemTest.h"
#include "RPGBlueprintLibrary.generated.h"
UCLASS()
class URPGBlueprintLibrary : public UBlueprintFunctionLibrary
{
GENERATED_UCLASS_BODY()
public:
/** Show the native loading screen, such as on a map transfer. If bPlayUntilStopped is false, it will be displayed for PlayTime and automatically stop */
UFUNCTION(BlueprintCallable, Category = Loading)
static void PlayLoadingScreen(bool bPlayUntilStopped, float PlayTime);
/** Turns off the native loading screen if it is visible. This must be called if bPlayUntilStopped was true */
UFUNCTION(BlueprintCallable, Category = Loading)
static void StopLoadingScreen();
/** Returns true if this is being run from an editor preview */
UFUNCTION(BlueprintPure, Category = Loading)
static bool IsInEditor();
//Returns the project version set in the 'Project Settings' > 'Description' section of the editor
UFUNCTION(BlueprintPure, Category = "Project")
static FString GetProjectVersion();
};
RPGBlueprintLibrary.h (1.0 KB)
RPGBlueprintLibrary.cpp
#include "RPGBlueprintLibrary.h"
#include "ActionRPGLoadingScreen.h"
URPGBlueprintLibrary::URPGBlueprintLibrary(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
}
void URPGBlueprintLibrary::PlayLoadingScreen(bool bPlayUntilStopped, float PlayTime)
{
IActionRPGLoadingScreenModule& LoadingScreenModule = IActionRPGLoadingScreenModule::Get();
LoadingScreenModule.StartInGameLoadingScreen(bPlayUntilStopped, PlayTime);
}
void URPGBlueprintLibrary::StopLoadingScreen()
{
IActionRPGLoadingScreenModule& LoadingScreenModule = IActionRPGLoadingScreenModule::Get();
LoadingScreenModule.StopInGameLoadingScreen();
}
bool URPGBlueprintLibrary::IsInEditor()
{
return GIsEditor;
}
FString URPGBlueprintLibrary::GetProjectVersion()
{
FString ProjectVersion;
GConfig->GetString(
TEXT("/Script/EngineSettings.GeneralProjectSettings"),
TEXT("ProjectVersion"),
ProjectVersion,
GGameIni
);
return ProjectVersion;
}
RPGBlueprintLibrary.cpp (989 Bytes)