# CDO Constrcutor failed to find blueprint class. Why?

**URL:** <https://forums.unrealengine.com/t/cdo-constrcutor-failed-to-find-blueprint-class-why/397110>\
**Category:** Blueprint\
**Tags:** reference-blueprint, unreal-engine, question, CPP\
**Created:** [July 7, 2017, 12:19pm UTC](https://forums.unrealengine.com/t/cdo-constrcutor-failed-to-find-blueprint-class-why/397110 "2017-07-07T12:19:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Greywacke](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Greywacke](https://forums.unrealengine.com/u/Greywacke)\
**Post date:** [July 7, 2017, 12:19pm UTC](https://forums.unrealengine.com/t/cdo-constrcutor-failed-to-find-blueprint-class-why/397110/1 "2017-07-07T12:19:10Z")

</div>

I am tearing my hair out over this one now, after spending literally hours trying to uncover the problem.  
I am having some difficulty using the ConstructorHelpers to find a blueprint.

```
	static ConstructorHelpers::FClassFinder<ASpaceApeMenuPlayerController> Controller(TEXT("/Game/GameBlueprints/PlayerControllerMenu_BP"));

	if (Controller.Class != NULL)
	{
		PlayerControllerClass = Controller.Class;
		//UE_LOG(LogTemp, Warning, TEXT("SetController"));
	}

```

The really irritating thing is, that it works elsewhere for a different blueprint.

```
	static ConstructorHelpers::FClassFinder<APlayerController_SpaceApe> Controller(TEXT("/Game/GameBlueprints/PlayerController_SpaceApe_BP"));

	if (Controller.Class != NULL)
	{
		PlayerControllerClass = Controller.Class;
	}

```

Could someone tell me why one would work, but the other does not?  
(preferably before I go crazy =P)

---

<div class="post-metadata">

**Author:** ![kamrann](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kamrann](https://forums.unrealengine.com/u/kamrann)\
**Post date:** [July 7, 2017, 1:07pm UTC](https://forums.unrealengine.com/t/cdo-constrcutor-failed-to-find-blueprint-class-why/397110/2 "2017-07-07T13:07:06Z")

</div>

Only plausible reasons for it to fail I can think of are 1) The path is wrong; 2) The blueprint exists, but doesn’t derive from the class you specified as the template argument.

You could maybe try fixing up redirectors in the folder first in case you changed the blueprint name, but I’m fairly sure `FClassFinder` should deal with that correctly anyway.

Though it’s not an answer to your question, I’d recommend avoiding hard coded blueprint paths in favour of adding a `TSubclassOf` (or `TAssetSubclassOf` if you can load it only when needed) property to the class, which you then set within the editor. It’s much more robust.

---

<div class="post-metadata">

**Author:** ![Greywacke](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Greywacke](https://forums.unrealengine.com/u/Greywacke)\
**Post date:** [July 7, 2017, 2:09pm UTC](https://forums.unrealengine.com/t/cdo-constrcutor-failed-to-find-blueprint-class-why/397110/3 "2017-07-07T14:09:22Z")

</div>

I had already fixed the redirectors, so that didn’t seem to make a difference.

I’m pretty sure the path is correct, so it must be that the parent class is different, but I’ve since made another blueprint class that inherits from the same C++ class and tried to find that, but had the same issue.

I’m just ditching the blueprints and going full C++, which was the plan all along anyway. They’re nothing but trouble. =P

Thanks for the response anyway.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2f922134](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2f922134](https://forums.unrealengine.com/u/anonymous_user_2f922134)\
**Post date:** [October 1, 2017, 5:40pm UTC](https://forums.unrealengine.com/t/cdo-constrcutor-failed-to-find-blueprint-class-why/397110/4 "2017-10-01T17:40:24Z")

</div>

Use

```
ConstructorHelpers::FObjectFinder<UClass>

```

with the blueprint class string, e.g.

```
/Game/Blueprint/MyObject.MyObject_C

```

.

---

<div class="post-metadata">

**Author:** ![siditious](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@siditious](https://forums.unrealengine.com/u/siditious)\
**Post date:** [October 15, 2018, 1:57pm UTC](https://forums.unrealengine.com/t/cdo-constrcutor-failed-to-find-blueprint-class-why/397110/5 "2018-10-15T13:57:05Z")

</div>

Dude, thank you for this.
