[Obstacle.h]
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "BountyDashObject.h"
#include "DestructibleComponent.h"
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "Obstacle.generated.h"
UCLASS(BlueprintType)
class BOUNTYDASH_API AObstacle : public ABountyDashObject
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
AObstacle();
UDestructibleComponent* GetDestructable();
protected:
public:
UPROPERTY(EditAnywhere, BlueprintReadWrite)
UDestructibleComponent* Mesh;
};
[Obstacle.cpp]
// Fill out your copyright notice in the Description page of Project Settings.
#include "Obstacle.h"
#include"BountyDashGameMode.h"
#include"BountyDash.h"
// Sets default values
AObstacle::AObstacle()
{
// 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;
Mesh = CreateDefaultSubobject<UDestructibleComponent>(TEXT("Mesh"));
check(Mesh);
Mesh->AttachTo(Collider);
Mesh->SetCollisionResponseToAllChannels(ECR_Ignore);
}
UDestructibleComponent* AObstacle::GetDestructable()
{
return Mesh;
}
266646-
First, I checked Enabled of ‘Apex Destruction’ in Plugins. And next, add the “ApexDestruction” int Build.cs file.
But I’can’t see details in blueprint.
What’s problem? I seriously don’t understand.