CDO Constructor Failed to find asset

Constructor helper failed to load asset.

I get the error message:

LogLinker: Warning: Failed to load ‘/Game/GunActorTest’: Can’t find file.
LogUObjectGlobals: Warning: Failed to find object ‘Actor /Game/GunActorTest.GunActorTest’


I tried testing with an asset in the folder /Game/Vehicles/GunActorTest, it doesn’t recognize it either. I’m confused as to how to use the paths in ConstructorHelpers::FObjectFinder(TEXT(“/Game/GunActorTest”));

is there something I’m doing wrong?

If you right click an asset you can choose “get reference” and it will result in this format:

WidgetBlueprint'/Game/Blueprints/UI/SomeWidget.SomeWidget'

Can you test this in these formats?:

/Game/Blueprints/UI/SomeWidget.SomeWidget'

WidgetBlueprint'/Game/Blueprints/UI/SomeWidget.SomeWidget'

When I right click and select copy reference i get:

Blueprint’/Game/GunActorTest.GunActorTest’

I tried doing:

TEXT(“Blueprint’/Game /GunActorTest.GunActorTest’”);
TEXT(“Blueprint/Game /GunActorTest.GunActorTest”);
TEXT(“/Game /GunActorTest.GunActorTest”);

none of these work.

I’m not sure what is going on then, your example shows a space in “/Game /” which should not be there but I think TEXT(“/Game/GunActorTest.GunActorTest”) should be OK.
Related:

Using ConstructorHelpers::FObjectFinder for UParticleSystem - Solution
Reddit - Dive into anything

I’m assuming that the asset is referenced, else according to those articles the FObjectFinder may fail. I also assume that the asset is in the project / Content folder and not in a plugin (thinking of a module loading order). It should also not be redirected to another name using a CoreRedirect. Not sure where to go from here

Ran into this issue myself today and for who knows why, I had to add “_C” to the end of the reference.

static ConstructorHelpers::FClassFinder<UMainMenuWidget> MainMenuClassObj(TEXT("/MainMenuPlugin/Blueprints/UI/MainMenu/WBP_MM_MainMenu.WBP_MM_MainMenu_C"));
if (MainMenuClassObj.Succeeded()) {
	MainMenuClass = MainMenuClassObj.Class;
}

(post deleted by author)