Hi all I am going through some of the documentation and I realize that it’s a bit outdated as I have had to tweak things slightly in each example so far. I am looking at this one now and I am running into a similar issue as in some of the others, and I could use some clarification.
For example, this section of code/header file (found at Components and Collision | Unreal Engine Documentation)
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/PawnMovementComponent.h"
#include "CollidingPawnMovementComponent.generated.h"
UCLASS()
class HOWTO_COMPONENTS_API UCollidingPawnMovementComponent : public UPawnMovementComponent
{
GENERATED_BODY()
public:
virtual void TickComponent(float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) override;
};
The above code throws errors with its associated .cpp file when building. But the code compiles successfully if I remove the HOWTO_COMPONENTS_API
part just after the class keyword in the UCollidingPawnMovementComponent declaration.
What is this? It looks a bit foreign to me. And I seem to have the issue with each of the older UE4 examples. Thanks!