本文整理汇总了C++中USkeletalMeshComponent::SetSkeletalMesh方法的典型用法代码示例。如果您正苦于以下问题:C++ USkeletalMeshComponent::SetSkeletalMesh方法的具体用法?C++ USkeletalMeshComponent::SetSkeletalMesh怎么用?C++ USkeletalMeshComponent::SetSkeletalMesh使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类USkeletalMeshComponent
的用法示例。
在下文中一共展示了USkeletalMeshComponent::SetSkeletalMesh方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Super
ACVehicleSpawner::ACVehicleSpawner(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer){
USkeletalMeshComponent* Mesh = ObjectInitializer.CreateDefaultSubobject<USkeletalMeshComponent>(this, TEXT("Mesh"));
static ConstructorHelpers::FObjectFinder<USkeletalMesh> PlaceHolderMesh(TEXT("SkeletalMesh'/Game/Spawner/placeholder_vehicle.placeholder_vehicle'"));
Mesh->SetSkeletalMesh(PlaceHolderMesh.Object);
RootComponent = Mesh;
SetActorHiddenInGame(true);
static ConstructorHelpers::FClassFinder<AFlockingVehicle> CarFinder(TEXT("/Game/Vehicle/FlockingCar"));
static ConstructorHelpers::FClassFinder<AFlockingVehicle> SedanFinder(TEXT("/Game/Vehicle/FlockingSedan"));
static ConstructorHelpers::FClassFinder<AFlockingVehicle> EmergencyFinder(TEXT("/Game/Vehicle/EmergencyVehicle"));
static ConstructorHelpers::FClassFinder<AFlockingVehicle> BusFinder(TEXT("/Game/Vehicle/FlockingBus"));
static ConstructorHelpers::FObjectFinder<UMaterial> Yellow(TEXT("Material'/Game/Sedan/Materials/M_Vehicle_Sedan_yelllo.M_Vehicle_Sedan_yelllo'"));
static ConstructorHelpers::FObjectFinder<UMaterial> Blue(TEXT("Material'/Game/Sedan/Materials/M_Vehicle_Sedan.M_Vehicle_Sedan'"));
static ConstructorHelpers::FObjectFinder<UMaterial> Green(TEXT("Material'/Game/Sedan/Materials/M_Vehicle_Sedan_green.M_Vehicle_Sedan_green'"));
VehicleTypeClass.Add((uint8)EVehicleType::VT_Car, CarFinder.Class);
VehicleTypeClass.Add((uint8)EVehicleType::VT_Sedan, SedanFinder.Class);
VehicleTypeClass.Add((uint8)EVehicleType::VT_Bus, BusFinder.Class);
VehicleTypeClass.Add((uint8)EVehicleType::VT_Emergency, EmergencyFinder.Class);
TArray<UMaterial*> Materials;
Materials.Add(Yellow.Object);
Materials.Add(Blue.Object);
Materials.Add(Green.Object);
VehicleTypeMaterials.Add((uint8)EVehicleType::VT_Car, Materials);
VehicleTypeMaterials.Add((uint8)EVehicleType::VT_Sedan, Materials);
}