I’m trying to create a hitbox ActorComponent that has access to FObjectInitializer, so it can give itself a collision volume to listen for overlap events. The constructor declaration is cut & pasted directly from the tutorial at C++ Only | Unreal Engine Documentation :
#include "IMorphemeNoun.h"
#include "MNHitbox.generated.h"
class CODEPROJECT_API UMNHitbox : public UIMorphemeNoun
{
GENERATED_BODY()
public:
UMNHitbox(const FObjectInitializer& ObjectInitializer);
};
However, the constructor declaration triggers an error, "unexpected type ‘FObjectInitializer’ ". I find this confusing, as I use the identical structure to declare constructors with FObjectInitializer in other components- is the problem with another part of the header?