x

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"

Adding UPathFollowingComponent to a PlayerController

When I add the

UPathFollowingComponent* PathFollowingComponent;

To a custom player controller class, I get this error

 2>  C:/Work/Projects/ProjectDivine/Source/ProjectDivine/Player/Controller/PlayerController1_Movement.h(19) : Unrecognized type 'UPathFollowingComponent' - type must be a UCLASS, USTRUCT or UENUM

Anyway to fix it?

I want to use PlayerController but copy the other parts of the PathFollowing component to it.

Product Version: UE 4.13
Tags:
more ▼

asked Sep 20 '16 at 02:14 PM in C++ Programming

avatar image

envenger
418 76 116 145

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

You'd need to include PathFollowingComponent.h, or add class UPathFollowingComponent; somewhere at the top of the file.

Cheers,

--mieszko

more ▼

answered Sep 20 '16 at 03:29 PM

avatar image

MieszkoZ STAFF
7.3k 223 56 408

avatar image envenger Sep 20 '16 at 03:46 PM

Well I have those. I removed temporary files and regenerated the project files and got a new error this time.

alt text

It looks like there are some dependencies missing or something

 2>     Creating library C:\Work\Projects\ProjectDivine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-ProjectDivine.lib and object C:\Work\Projects\ProjectDivine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-ProjectDivine.exp
 2>ProjectDivine.generated.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class UClass * __cdecl Z_Construct_UClass_UPathFollowingComponent_NoRegister(void)" (__imp_?Z_Construct_UClass_UPathFollowingComponent_NoRegister@@YAPEAVUClass@@XZ) referenced in function "class UClass * __cdecl Z_Construct_UClass_APlayerController1_Movement(void)" (?Z_Construct_UClass_APlayerController1_Movement@@YAPEAVUClass@@XZ)
 2>C:\Work\Projects\ProjectDivine\Binaries\Win64\UE4Editor-ProjectDivine.dll : fatal error LNK1120: 1 unresolved externals
 2>ERROR : UBT error : Failed to produce item: C:\Work\Projects\ProjectDivine\Binaries\Win64\UE4Editor-ProjectDivine.dll

capture.png (70.3 kB)
(comments are locked)
10|2000 characters needed characters left

Hey envenger!

Could it be that you forgot to add AIModule to the Dependencies?

To do this go to the MyProject.Build.cs file and add "AIModule" to the PublicDependencyModuleNames.

Hope this helps :)
Elias

more ▼

answered Sep 23 '16 at 10:59 AM

avatar image

PasteDog
1.2k 24 15 53

(comments are locked)
10|2000 characters needed characters left
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