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"

how include works

Ok so first off i wasn't able to think of a better name for the question but i do know what include is and what id does but it seems i am either not working with it correctly or am making a really stupid mistake

i am going to start with a very simple one using the c++ side scroller template i tried to make an actor with a simple ArrowComponent i did everything as was done in the character class regarding the CameraComponent and SpringArmComponent but i kept on getting compiler errors. i tried to replicate every aspect of the character class into my simple actor class but it wouldn't work and in the end i just tried adding the arrow component to the character only to see it doesn't work?!?!?!?!?! so i did something i just kept saying is stupid in the include directory i added this

include "Runtime/Engine/Classes/Components/ArrowComponent.h"

and it worked.... but this doesn't make any sense!?!?!? since this was not done for any of the other components that were added the same way my arrow component was added!!!!

i am confused but happy in some way since every time i approached c++ i would have problems with this kind of stuff i never got to actually do anything because i would waste hours trying to add a stupid component to my actor

so please i am really confused on how a class knows of something but doesn't know of something real similar i mean you'd think an actor would know about components since it doesn't even show any error before compiling and even the erroe it gives at compilation time doesn't realy direct me to where the problem is but takes me to an engine class i don't realy know anything about

thanks in advance

some pics of problem:

alt text

alt text

Product Version: Not Selected
screenshot (3).png (203.2 kB)
screenshot (4).png (216.7 kB)
more ▼

asked May 02 '15 at 12:31 PM in C++ Programming

avatar image

52 5 7 11

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

1 answer: sort voted first

i had a similar problem yesterday that i could not use some UComponents in my Vehicle c++ project without the include, that where used without include in a Tutorial( Basic Code project). so i looked for differences and found them in ModulName.h(in your case ModularSciFi.h) they use different includes.

Basic Code project includes Engine.h while the Vehicle project only includes CoreUObject.h

so if you dont want to include most UComponents, you can change your include to Engine.h

more ▼

answered May 02 '15 at 01:55 PM

avatar image

55 3 5

avatar image a_najafi May 02 '15 at 06:30 PM

You are completely correct!!!!!!! Thnx Alot!

(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