mirror of
https://github.com/storytold/EventCenterPlugin.git
synced 2026-10-09 00:09:42 +00:00
this constructor call seems to work?
I added the starter content
This commit is contained in:
@@ -11,6 +11,10 @@ ASpawnableActor::ASpawnableActor()
|
|||||||
// Set this actor to call Tick() every frame.
|
// Set this actor to call Tick() every frame.
|
||||||
// You can turn this off to improve performance if you don't need it.
|
// You can turn this off to improve performance if you don't need it.
|
||||||
PrimaryActorTick.bCanEverTick = true;
|
PrimaryActorTick.bCanEverTick = true;
|
||||||
|
|
||||||
|
static ConstructorHelpers::FObjectFinder<UStaticMesh> BaseMeshAsset(TEXT("StaticMesh'/Game/StarterContent/Props/MaterialSphere.MaterialSphere'"));
|
||||||
|
//static ConstructorHelpers::FObjectFinder<UStaticMesh> BaseMeshAsset(TEXT("StaticMesh'/Game/StarterContent/Props/MaterialSphere.uasset'"));
|
||||||
|
UStaticMesh* Asset = BaseMeshAsset.Object;
|
||||||
}
|
}
|
||||||
|
|
||||||
ASpawnableActor::~ASpawnableActor()
|
ASpawnableActor::~ASpawnableActor()
|
||||||
@@ -35,11 +39,12 @@ void ASpawnableActor::Tick(float DeltaTime)
|
|||||||
|
|
||||||
void ASpawnableActor::SetMesh()
|
void ASpawnableActor::SetMesh()
|
||||||
{
|
{
|
||||||
|
// NB: Everything below segfaults
|
||||||
//BaseMesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("BaseMesh"));
|
//BaseMesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("BaseMesh"));
|
||||||
//BaseMesh->SetupAttachment(RootComponent);
|
//BaseMesh->SetupAttachment(RootComponent);
|
||||||
|
|
||||||
/*static ConstructorHelpers::FObjectFinder<UStaticMesh> BaseMeshAsset(TEXT("StaticMesh'/Game/StarterContent/Props/MaterialSphere.MaterialSphere'"));
|
/*
|
||||||
|
static ConstructorHelpers::FObjectFinder<UStaticMesh> BaseMeshAsset(TEXT("StaticMesh'/Game/StarterContent/Props/MaterialSphere.MaterialSphere'"));
|
||||||
if (BaseMeshAsset.Object)
|
if (BaseMeshAsset.Object)
|
||||||
{
|
{
|
||||||
BaseMesh->SetStaticMesh(BaseMeshAsset.Object);
|
BaseMesh->SetStaticMesh(BaseMeshAsset.Object);
|
||||||
|
|||||||
Reference in New Issue
Block a user