[BUG?] Editor crash on loading ConstructorHelpers::FObjectFinder<UDataTable> is in BluePrintLibrary

I have an editor crash on loading.
It is cause when I add

ConstructorHelpers::FObjectFinder<UDataTable> GameObjectLookupDataTable_BP(TEXT("DataTable'/Game/ThirdPerson/GameObjectLookupTable.GameObjectLookupTable'"));

to my UGeneratorFunctionLibrary.


No minidump found for this crash.

#pragma once

#include "Kismet/BlueprintFunctionLibrary.h"
#include "GeneratorFunctionLibrary.generated.h"

class MYRUNNER_API UGeneratorFunctionLibrary : public UBlueprintFunctionLibrary

	UFUNCTION(BlueprintCallable, Category = "VictoryBPLibrary")
		static FString GetHappyMessage();	


#include "MyRunner.h"
#include "GeneratorFunctionLibrary.h"

ConstructorHelpers::FObjectFinder<UDataTable> GameObjectLookupDataTable_BP(TEXT("DataTable'/Game/ThirdPerson/GameObjectLookupTable.GameObjectLookupTable'"));

//Happy Message
FString UGeneratorFunctionLibrary::GetHappyMessage()
	return FString("Victory! Victory BP Library Works!");

If I move this string to GetHappyMessage() then Editor will have loaded but when I start game it will crash (because the function called on event begin play)

The path in ConstructorHelpers is true because I copy it from editor (RightClick on it → CopyReference)

The GameObjectLookupDataTable is created from class StrucGenerator in Editor and it is normal, i can edit it and save, is is ok.


#pragma once

#include "StrucGenerator.generated.h"

struct FStrucGenerator : public FTableRowBase

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GO")
		int32 Rank;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GO")
		int16 Category;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GO")
		int32 Usecode;



ConstructorHelpers functions need to be declared within the class’ constructor. The constructor will probably have a name resembling:



I can’t override UGeneratorFunctionLibrary and UBlueprintFunctionLibrary constructor :frowning:

I’ve found that certain paths from the editor need modified to work properly with the ObjectFinder()


ConstructorHelpers::FObjectFinder<UDataTable> GameObjectLookupDataTable_BP(TEXT**("DataTable'/Game/ThirdPerson/GameObjectLookupTable.GameObjectLookupTable'"))**;


ConstructorHelpers::FObjectFinder<UDataTable> GameObjectLookupDataTable_BP**(TEXT("/Game/ThirdPerson/GameObjectLookupTable.GameObjectLookupTable"))**;

and see if that fixes it.

You’re removing the DataType from the beginning of the path, and you’re getting rid of the apostrophe (’ ') markings.

If that doesn’t work, try:

ConstructorHelpers::FObjectFinder<UDataTable> GameObjectLookupDataTable_BP**(TEXT("/Game/ThirdPerson/GameObjectLookupTable"))**;

which removes the additional “.GameObjectLookupTable” at the end of the pathfile, it was the only way to get my UMG Blueprint Class referenced in C++.