Hi,
i have a class(AAbstractCharacter) that inherit from APawn and i want to add a UCapsuleComponent.
In my header file i add following lines:
UPROPERTY(Category = Character, VisibleAnywhere, BlueprintReadOnly)
TSubobjectPtr<class UCapsuleComponent> capsuleComponent;
On compiling i get these errors:
1>C:\gamedev\Unreal Engine\Projects\MyGame\Intermediate\Build\Win64\Inc\MyGame\MyGame.generated.cpp(59): error C2039: 'CapsuleComponent': Ist kein Element von 'AAbstractCharacter'
1> C:\gamedev\Unreal Engine\Projects\MyGame\Source\MyGame\Character/AbstractCharacter.h(9): Siehe Deklaration von 'AAbstractCharacter'
1>C:\gamedev\Unreal Engine\Projects\MyGame\Intermediate\Build\Win64\Inc\MyGame\MyGame.generated.cpp(59): error C2661: 'UObjectProperty::UObjectProperty': Keine überladene Funktion akzeptiert 4 Argumente
“‘CapsuleComponent’: Ist kein Element von ‘AAbstractCharacter’” means that “‘AAbstractCharacter’ dont have a attribute ‘CapsuleComponent’” (why is the first char uppercase ?)
When i change “capsuleComponent” to “CapsuleComponent” it works fine.
Can someone explain me why this is and/or how to fix it ?
Thank for the help