UnrealScripterAI
Discord ↗
Link Copied to Clipboard
×
"make a sword"
// Create a Sword void ASword::CreateSword() { // Create the sword mesh SwordMesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Sword Mesh")); SwordMesh->SetupAttachment(RootComponent); // Create the sword material SwordMaterial = CreateDefaultSubobject<UMaterialInterface>(TEXT("Sword Material")); // Set the sword mesh's material SwordMesh->SetMaterial(0, SwordMaterial); }