I will mention but mostly ignore the missing "U
" as the leading character of your UObject derived classes.
when overriding a function that is labeled virtual
in the base class it should still be labeled virtual
in the derived class
void EnterState() override;
//becomes
virtual void EnterState() override;
this is one of the ways C++ is a bit dumb, but realistically the C++ compiler should have thrown a red flag
the virtual
says “add this to the virtual function table to be resolved at the time the function is called” it is supposed to be a requirement that for any function initially declared as virtual that all decedents of the class that re-declare the function “shall” also be declared as virtual.
in theory adding the virtual ensures the re-declaration/re-definitions are also added to the Virtual Function Table and should clear up the error as the VFT should be utilized directly. additionally if you are going to have no further re-declaration/re-definition of a function on the VFT then instead of “override
” you would put “final
” which means this is the well “final” re-declaration/re-definition of this function.