Reputation: 1
After creating a class from the Unreal Engine editor, Visual Studio 2022 throws errors and does not find macros and includes Unreal and Live Coding fails. All the necessary components are installed. This happens only when creating classes, it works fine initially. I have not added a single line of code to this file.I delete the created class and the errors disappear and the project can be built. The errors in the screenshot error image
Reinstalling Unreal Engine and Visual Studio did not help solve the problem. Generate vs project files and deleting the Intermediate and Binaries folders didn't help either.
Upvotes: 0
Views: 242
Reputation: 1
The error has been fixed. Since I am a novice programmer, I did not specify its type when creating the class, whether it is public or private. Strangely, I didn't notice any Public or Private subfolders in the Lyra project.
If you want to structure .h and .cpp files in one place, then add the name of your solution to the file "'solution name'.Build.cs". In the line:
PublicIncludePaths.AddRange( new string[] { "solution name" }
Upvotes: 0