我正在使用Unreal 4.18和Visual Studio 2017.使用某些类如UShapeComponent,UBoxComponent,USphereComponent给出标识符是未定义的错误,而喜欢USceneComponent,UStaticMeshComponent工作得很好。怎么了?
这是我的代码:
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "MyActor.generated.h"
UCLASS()
class UNREALTUROIAL_API AMyActor : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
AMyActor();
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
UPROPERTY(EditAnywhere)
UStaticMeshComponent* PickUpMesh;
UPROPERTY(EditAnywhere)
UShapeComponent* PickUpBox;
UPROPERTY(EditAnywhere)
USceneComponent* PickUpRoot;
};