mirror of
https://github.com/storytold/EventCenterPlugin.git
synced 2026-10-09 00:09:42 +00:00
component attachment works here
This commit is contained in:
@@ -14,7 +14,12 @@ ASpawnableActor::ASpawnableActor()
|
|||||||
|
|
||||||
static ConstructorHelpers::FObjectFinder<UStaticMesh> BaseMeshAsset(TEXT("StaticMesh'/Game/StarterContent/Props/MaterialSphere.MaterialSphere'"));
|
static ConstructorHelpers::FObjectFinder<UStaticMesh> BaseMeshAsset(TEXT("StaticMesh'/Game/StarterContent/Props/MaterialSphere.MaterialSphere'"));
|
||||||
//static ConstructorHelpers::FObjectFinder<UStaticMesh> BaseMeshAsset(TEXT("StaticMesh'/Game/StarterContent/Props/MaterialSphere.uasset'"));
|
//static ConstructorHelpers::FObjectFinder<UStaticMesh> BaseMeshAsset(TEXT("StaticMesh'/Game/StarterContent/Props/MaterialSphere.uasset'"));
|
||||||
UStaticMesh* Asset = BaseMeshAsset.Object;
|
//UStaticMesh* Asset = BaseMeshAsset.Object;
|
||||||
|
BaseMesh = BaseMeshAsset.Object;
|
||||||
|
|
||||||
|
|
||||||
|
BaseMeshComponent = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("BaseMesh"));
|
||||||
|
BaseMeshComponent->SetupAttachment(RootComponent);
|
||||||
}
|
}
|
||||||
|
|
||||||
ASpawnableActor::~ASpawnableActor()
|
ASpawnableActor::~ASpawnableActor()
|
||||||
|
|||||||
@@ -24,7 +24,11 @@ public:
|
|||||||
|
|
||||||
/** Mesh to use */
|
/** Mesh to use */
|
||||||
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SpawnableActor", meta = (AllowPrivateAccess = "true"))
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SpawnableActor", meta = (AllowPrivateAccess = "true"))
|
||||||
class UStaticMeshComponent* BaseMesh;
|
class UStaticMeshComponent* BaseMeshComponent;
|
||||||
|
|
||||||
|
/** Mesh to use */
|
||||||
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SpawnableActor", meta = (AllowPrivateAccess = "true"))
|
||||||
|
class UStaticMesh* BaseMesh;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Called when the game starts or when spawned
|
// Called when the game starts or when spawned
|
||||||
|
|||||||
Reference in New Issue
Block a user