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"

ConstructorHelpers::FObjectFinder not working in UE 4.16.1

I need to find an object in my C++ code. Previously I used something like this:

 static ConstructorHelpers::FObjectFinder<UParticleSystem> PistolParticles(TEXT("ParticleSystem'/Game/Particles/Weapons/Pistol.Pistol'"));

Did something change in UE 4.16? Do I have to include something extra because of IWYU? Or am I doing something wrong?

Product Version: UE 4.16
more ▼

asked Jun 25 '17 at 08:44 PM in C++ Programming

avatar image

94 21 24 28

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

1 answer: sort voted first

You can include "Runtime/CoreUObject/Public/UObject/ConstructorHelpers.h" to make sure Intellisense is working properly. It's difficult to find information about this, but it may be in a pre compiled header, so you actually don't need to include it like UWorld.

more ▼

answered Jun 25 '17 at 09:00 PM

avatar image

4.2k 88 38 152

avatar image J0K3R_12QQ Jun 25 '17 at 09:02 PM

It worked! Thank you!

avatar image Hurgleman Mar 23 '19 at 08:04 PM

Adding on to this, you need to include the constructor helpers in version 4.21, as the following.

 #include "ConstructorHelpers.h"

UE will give a compilation error when trying to compile ConstructorHelpers without 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