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 new classes to C++ project

This is probably very simple, but I can't wrap my head around.

I have created sample TPP project. When I browser it there are some things that I just don't know how they end up in:*.

  1. *.generated.h in External Dependencies. I figured out it is in Intermediate folder. But how did it end up here in the first place ?

  2. I add new class header file to project. But I can't reference it anywhere. I guess it have something to do with *.generated.h files, which brings us to first question.

  3. I thought I need to run *.bat script, but expect from regenerating base project from scratch it doesn't seem to do much.

  4. There is also *Classes.h file. I guess I have to add all custom class includes here ?

Could we get some explanation on project structure and how to handle it ?

Product Version: Not Selected
Tags:
more ▼

asked Mar 11 '14 at 02:03 AM in C++ Programming

avatar image

ue4-archive ♦♦ STAFF
50k 3671 2000 9125

avatar image The_Shane Jul 03 '15 at 05:09 AM

Thanks, helped me out as well!

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

1 answer: sort voted first

Ok. I figured out how this thing works. In case someone have the same problem:

  1. Add new class to Classes filter. When popup window showup browser to classes folder in you project [projectName]\Source\[ProjectName]\Classes And add header file here. do the same respectevily for cpp files (they are going to Private folder).

  2. Open header file and paste this:

    > #include "TPPPlayerCamera.generated.h" > UCLASS(Blueprintable) > class ATPPPlayerCamera : public APlayerCamera > { > GENERATED_UCLASS_BODY() > };

  3. The open you cpp file and paste:

    > #include "YourProjectName.h" //an file usually in public folder > AYourClassName::AYourClassName(const FPostConstructInitializeProperties& PCIP) > : Super(PCIP) > { > }

After that rebuild project. do not add anything inside classes before you rebuild.

I haven't tested it but I think process for creating files in subfolder is similiar. First create Filter with you desired folder name and then create folder in Class or Private folders of your project.

more ▼

answered Mar 11 '14 at 02:03 AM

avatar image

ue4-archive ♦♦ STAFF
50k 3671 2000 9125

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 02:03 AM

Thank you, certainly clarified things for me a bit.

(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