Hi everyone,
I’m struggling with a problem I think easy to fix.
I’m trying to use LoadPackageAsync(), but it requires a FLoadPackageAsyncDelegate.
This delegate is declared in UObjectGlobals.h like this :
DECLARE_DELEGATE_ThreeParams(FLoadPackageAsyncDelegate, const FName& /*PackageName*/, UPackage* /*LoadedPackage*/, EAsyncLoadingResult::Type /*Result*/)
My UFUNCTION is like this :
// Delegate used when we will end a map precaching
UFUNCTION()
void PackageLoadedDelegate(const FName& PackageName, class UPackage* LoadedPackage, EAsyncLoadingResult::Type Result);
Problem : I can’t compile because the compiler doesn’t seems to find the EAsyncLoadingResult
D:/UnrealProjects/AsyncMapLoading/Source/AsyncMapLoading/Public/AsyncLoader.h(58):
error : Cannot find class ‘’, to
resolve delegate ‘Type’
It looks like he’s looking for a class instead of the namespace. All right lets make a
using namespace EAsyncLoadingResult;
…
D:/UnrealProjects/AsyncMapLoading/Source/AsyncMapLoading/Public/AsyncLoader.h(60): error : Unrecognized type ‘Type’ - type must be a UCLASS, USTRUCT or UENUM
Did anyone succeed to use this enum inside a UFUNCTION ?
Best regards everyone,
Alexandre
PS : without the UFUNCTION it compiles well, but I need this MACRO because otherwise I can’t bind it.
