I am working on my first project and using C++ to do some work. When I try to build the C++ project I get several errors including UMaterialInstanceConstant* cannot be converted to UMaterialInterface, FActorSpawnParameters is not defined, GEngine is not defined, World is an incomplete class type and cannot be used. If I comment out the line associated with the first issue, and do a full rebuild the build will succeed. But just building causes these errors. I assume that there is something missing from my project but I cannot figure out what?
That is what I thought with the includes but why would it work with a full rebuild and not a regular build?
As for the code to include not sure what or how much to add here.
I have 2 classes one for the game board and one for pieces. The Grid class has the following includes: #include “GamePiece.h” #include “CoreMinimal.h” #include “GameFramework/Actor.h” #include “TicTacToeGrid.generated.h”
That actually resolved all of these problems. Now I get a message ‘identifier “FDrawingPolicyRenderState” is undefined’ about 80% of the time when I build. If I rebuild the solution than everything works well.