I am trying to declare a UWorld property so that I can setup a Level asset selector, but when I try to declare the UWorld property like below I get errors:
UPROPERTY(EditAnywhere, BlueprintReadOnly)
TAssetPtr<UWorld> WorldTest;
The full h is here:
#pragma once
#include "Internationalization/Text.h"
#include "UObject/Object.h"
#include "UObject/ObjectMacros.h"
#include "BatchAsset.generated.h"
UCLASS(BlueprintType, hidecategories=(Object))
class BATCHASSET_API UBatchAsset : public UObject
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadOnly)
TAssetPtr<UWorld> WorldTest;
};
The error in the output log is as follows:
Creating library E:\Github\BatchRendering\BatchProject\Plugins\BatchRender\Intermediate\Build\Win64\UE4Editor\Development\BatchAsset\UE4Editor-BatchAsset.suppressed.lib and object E:\Github\BatchRendering\BatchProject\Plugins\BatchRender\Intermediate\Build\Win64\UE4Editor\Development\BatchAsset\UE4Editor-BatchAsset.suppressed.exp
1>Module.BatchAsset.gen.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class UClass * __cdecl Z_Construct_UClass_UWorld_NoRegister(void)" (__imp_?Z_Construct_UClass_UWorld_NoRegister@@YAPEAVUClass@@XZ) referenced in function "void __cdecl `dynamic initializer for 'public: static struct UE4CodeGen_Private::FObjectPropertyParams const Z_Construct_UClass_UBatchAsset_Statics::NewProp_WorldTest''(void)" (??__E?NewProp_WorldTest@Z_Construct_UClass_UBatchAsset_Statics@@2UFObjectPropertyParams@UE4CodeGen_Private@@B@@YAXXZ)
1>E:\Github\BatchRendering\BatchProject\Plugins\BatchRender\Binaries\Win64\UE4Editor-BatchAsset.dll : fatal error LNK1120: 1 unresolved externals
I’m not even up to trying to set the UWorld parameter in the Slate Widget cause I can’t get this to declare the variable in the asset.