Adding any new c++ class causes compile error in Engine code

that can totally happen due to what i’ve explained about unity builds.
and also on cpp syntax errors can propagate to other files depending on the includes as well.
probably the issue is in the file that includes playerstate, or on a file included before that include.

or maybe it’s not generating correctly the .gen.h files…

when you say

Except for the source files i copied over

can you share those files?
the code, not a screenshot.

the link that you shared, contains a solution by “disabling unity builds” which sounds like a very unfortunate way to patch it (and i wouldn’t recommend it), and also related to what i was mentioning. so it reinforces my idea that you have a syntax issue that is propagating.

clean up your includes and you might get a better error message, my recommendations are:

  • forward declare all you can, only include on .cpp
  • maybe you can try to order your includes to be engine > 3rd parties > plugins > your code.