虚幻引擎4:UShapeComponent给出错误'标识符未定义'。我能做什么?

时间:2018-01-22 11:14:38

标签: c++ game-engine unreal-engine4 unreal-development-kit

我正在使用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;




};

0 个答案:

没有答案