Added generation to vehicles and pedestrians
This commit is contained in:
parent
2d59fd5788
commit
63227ba665
|
@ -1044,6 +1044,12 @@ void UActorBlueprintFunctionLibrary::MakeVehicleDefinition(
|
|||
EActorAttributeType::Int,
|
||||
FString::FromInt(Parameters.NumberOfWheels)});
|
||||
Success = CheckActorDefinition(Definition);
|
||||
|
||||
Definition.Attributes.Emplace(FActorAttribute{
|
||||
TEXT("generation"),
|
||||
EActorAttributeType::Int,
|
||||
FString::FromInt(Parameters.Generation)});
|
||||
Success = CheckActorDefinition(Definition);
|
||||
}
|
||||
|
||||
template <typename T, typename Functor>
|
||||
|
@ -1105,6 +1111,11 @@ void UActorBlueprintFunctionLibrary::MakePedestrianDefinition(
|
|||
EActorAttributeType::String,
|
||||
GetGender(Parameters.Gender)});
|
||||
|
||||
Definition.Attributes.Emplace(FActorAttribute{
|
||||
TEXT("generation"),
|
||||
EActorAttributeType::Int,
|
||||
FString::FromInt(Parameters.Generation)});
|
||||
|
||||
Definition.Attributes.Emplace(FActorAttribute{
|
||||
TEXT("age"),
|
||||
EActorAttributeType::String,
|
||||
|
|
|
@ -52,4 +52,7 @@ struct CARLA_API FPedestrianParameters
|
|||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
TArray<float> Speed;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
int32 Generation = 0;
|
||||
};
|
||||
|
|
|
@ -27,6 +27,9 @@ struct CARLA_API FVehicleParameters
|
|||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
int32 NumberOfWheels = 4;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
int32 Generation = 0;
|
||||
|
||||
/// (OPTIONAL) Use for custom classification of vehicles.
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
FString ObjectType;
|
||||
|
|
Loading…
Reference in New Issue