Actor as box. How to set material?

#pragma once

#include "GameFramework/Actor.h"
#include "Platform.generated.h"

/**
 * 
 */
UCLASS()
class LUDUMDARE30_API APlatform : public AActor
{
	GENERATED_UCLASS_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Pickup)
	bool bIsActive;

	UPROPERTY(VisibleDefaultsOnly, BlueprintReadOnly, Category = Pickup)
	TSubobjectPtr<UBoxComponent> BaseCollisionComponent;

	UPROPERTY(VisibleDefaultsOnly, BlueprintReadOnly, Category = Pickup)
	TSubobjectPtr<UBoxComponent> PlatformBox;
	
};



#include "LudumDare30.h"
#include "Platform.h"


APlatform::APlatform(const class FPostConstructInitializeProperties& PCIP)
	: Super(PCIP)
{
	bIsActive = true;

	BaseCollisionComponent = PCIP.CreateDefaultSubobject<UBoxComponent>(this, TEXT("BaseBoxComponent"));

	RootComponent = BaseCollisionComponent;

	PlatformBox = PCIP.CreateDefaultSubobject<UBoxComponent>(this, TEXT("PlatformBox"));

	//PlatformBox->SetSimulatePhysics(true);
	//PlatformBox->

	PlatformBox->AttachTo(RootComponent);
}

Hi.

I wanted to make an Actor represented as box but how should apply material to him?

Thanks in advance for help.

From what i know, box component don’t have any actual mesh to set material, is just used for collision detection.

This is how you add 1 material.

//Adding materials to the static mesh component.
	static ConstructorHelpers::FObjectFinder<UMaterial> Material(TEXT("<INSERT MATERIAL REFERENCE>"));
	if (Material.Succeeded()){
		this->StaticMeshComponent->SetMaterial(0, Material.Object);
	}

UBoxComponent cannot have materials added to it.