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"

Error at UCLASS() after including a H file

Hello, guy, I've just download UE4 and start playing with it, so yeh... I'm a noob for the moment. But I have an interesting problem. I've made a class Actor and in .h file, I've just added this part part of code:

 UPROPERTY(EditAnywhere)
     UShapeComponent* RootBox;

 UPROPERTY(EditAnywhere)
     float speed = 10.0f;

And now... from some reason after I've include this file I've receive a bunch of error at UCLASS() and GENERATED_BODY()alt text

 `#include "Components/ShapeComponent.h"`


Do you have any idea why I have this problem and how exactly I can fix it?

Here is the error message: alt text

Product Version: UE 4.17
Tags:
untitled.png (102.9 kB)
err.png (5.6 kB)
more ▼

asked Oct 09 '17 at 11:04 PM in C++ Programming

avatar image

vildnex
3 1 3

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

2 answers: sort voted first

Try place BulletController.generated.h as last include And generate project files after.

You should always place .generated.h as last include. It's required rule for Unreal Header Tool.

Besides. The VS highlighting not friendly with this macros. It's not an error. Generated files just not actual for this moment.

more ▼

answered Oct 10 '17 at 08:29 AM

avatar image

broly
584 45 65 95

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

You should include "xx.generated.h" at the very last.

more ▼

answered Oct 10 '17 at 04:36 AM

avatar image

rigmania
24 3 8 13

avatar image vildnex Oct 10 '17 at 08:06 AM

Doesn't matter the position of "xx.generated,h" because I receive the same error

(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