Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

UE4 can't find blueprint

I made a CameraShake blueprint for a head bobbing motion on my player camera and in my player character class I did this:


 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category=Camera)
     class UCameraShake* CameraBob;

In the constructer in AdNoctvmPlayerCharacter.cpp

 static ConstructorHelpers::FObjectFinder<UCameraShake> CameraBobOb(TEXT("/Game/Blueprints/Blueprint_CameraBob"));
     CameraBob = CameraBobOb.Object;

It compiles, but when I open the editor, I get this error message:

Default Property warnings and errors: Error: CDO Constructor: Failed to find /Game/Blueprints/Blueprint_CameraBob

I have no idea what I did wrong. I made sure there was no typo in the path name and just to be extra sure, I went into my player character blueprint and tried referencing Blueprint_CameraBob in there, but the editor won't find it/accept it. Both the variable CameraBob and the blueprint inherit from UCameraShake. I'm really lost here.

Product Version: Not Selected
more ▼

asked Jun 18 '14 at 11:52 PM in C++ Programming

avatar image

75 12 19 25

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hi vibgyorc6,

Have you tried using this line?

 static ConstructorHelpers::FObjectFinder<UCameraShake> CameraBobOb(TEXT("Blueprint'/Game/Blueprints/Blueprint_CameraBob.Blueprint_CameraBob"));
more ▼

answered Jun 19 '14 at 08:19 PM

avatar image vibgyorc6 Jun 19 '14 at 10:21 PM

It still doesn't work. I compiled it with that line and the editor crashed when I tried opening it up. Here's the crash log: http://pastebin.com/TdzH3m1R

avatar image Tim C ♦♦ STAFF Jun 19 '14 at 10:47 PM

Did you also get a callstack when the Editor crashed?

avatar image vibgyorc6 Jun 19 '14 at 11:01 PM
avatar image vibgyorc6 Jun 19 '14 at 11:14 PM

I looked at the callstack a second time and noticed that the second ' was missing. Now the editor doesn't crash anymore, but I'm getting the exact same problem as my original question described. :(

avatar image Tim C ♦♦ STAFF Jun 20 '14 at 02:14 PM

Hi vibgyorc6,

This could be a silly question, but have you verified that your Blueprint is actually located in your /Game/Blueprints/ folder? I created a setup very similar to yours and it worked fine. On a hunch, I moved the Blueprint to a different folder, and I started getting the same warning message you described. When I moved it back into that folder, the warning message went away and everything worked fine again.

Also, the missing ' was entirely my fault. Sorry about that.

avatar image vibgyorc6 Jun 20 '14 at 06:59 PM

I guess I shouldn't have posted this question in the C++ section because the problem isn't just in my code. In the editor, I tried referencing the CameraBob blueprint in my player blueprint and nothing shows up in the drop down menu and just to be sure, I tried dragging the blueprint over to the drop down menu and it won't accept it. I just get a red box.

avatar image Tim C ♦♦ STAFF Jun 20 '14 at 07:31 PM

Hi vibgyorc6,

When you set up your CameraShake Blueprint, did you create it based on a custom code class, or did you just create a new Blueprint in the Editor?

avatar image vibgyorc6 Jun 20 '14 at 07:38 PM

I created a new blueprint in the editor based on UCameraShake from the engine.

avatar image Tim C ♦♦ STAFF Jun 20 '14 at 07:46 PM

Try using the following lines in your code and see if it helps:


 class UBlueprint* CameraBob;


 static ConstructorHelpers::FObjectFinder<UBlueprint> CameraBobOb(TEXT("Blueprint'/Game/Blueprints/TestBP.TestBP'"));
avatar image vibgyorc6 Jun 20 '14 at 07:59 PM

Huh, it works! Thanks, Tim! It seems like it would be an obvious solution but I didn't think of it.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question