include error


anyone can help with this error , i got the same error with (include “kismetAnimationLibrary”


Here is the build class

I think you need create a uclass inside of the file.

UCLASS()
class  UMyClass : public UWhatever
{
	GENERATED_BODY()
};

That looks horrible…

it must be like this:

yyy

Maybe you need create a new project and migrate your assets if you have a previuos work.

the .generated.h is for UCLASS()

#include (HeaderName).generated.h          //<---

UCLASS()          <---
class UMyObject : public UObject
{
     GENERATED_BODY()          // <---
}

those 3 <--- are the rules of using UObject based class

I was trying to use UENUM. Is there a better way?

By the way I get an error when I use UCLASS

u need to write UCLASS() or UENUM() then define the class or enum, then the .generated.h error can go away

I still get the same error

  • Sometime, in visual studio will just show error in .generated.h, but it compiles
  • I noticed UENUM() also show error
  • maybe u need #include CoreMinimal.h

image
i include it and still got the same error

You have an empty space before the filename… remove it

wrong → " filename.h"
Ok → “filename.h”

Thank you for the help, but this did not help anything. I think the problem is in include search paths I tried hard, but it did not work, even though the person whose courses I was watching did not make any of these mistakes

Do you have arabic characters in your file path?
If so… remove it

no dont have

For a enum you don’t need the generated file…
in fact you don’t need any include file.

This is an example:

0000

oh thanks

You are wellcome!!

The generated files is only needed for:
UCLASS() and USTRUCT()
Remember that


there is something wrong , and i need the generated to call that to the animtion class