Hey, so since I have programmed this code:
AFloatingPickUp::AFloatingPickUp()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;
itemRoot = CreateDefaultSubobject<USceneComponent>(TEXT("ItemRoot"));
RootComponent = itemRoot;
pickUpItem = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("PickUpItem"));
pickUpItem->AttachToComponent(itemRoot, FAttachmentTransformRules::SnapToTargetNotIncludingScale);
rootShape = CreateDefaultSubobject<UShapeComponent>(TEXT("RootShape"));
rootShape->SetWorldScale3D(FVector (1.0f, 1.0f, 1.0f));
rootShape->bGenerateOverlapEvents = true;
rootShape->OnComponentBeginOverlap.AddDynamic(this, &AFloatingPickUp::onPlayerEnterPickUpBox);
rootShape->AttachToComponent(itemRoot, FAttachmentTransformRules::SnapToTargetIncludingScale);
}
Unreal 4 crashes and I cannot reopen the file. Anyone else experiencing this? And any help I can get would be much appreciated as I am a Unreal 4 noob.
Thanks!