Changed Custom movement component begin play execution order to prevent disable before initialization
This commit is contained in:
parent
e468508862
commit
1e6472ac15
|
@ -21,8 +21,8 @@ void UCarSimManagerComponent::CreateCarsimComponent(
|
|||
#ifdef WITH_CARSIM
|
||||
UCarSimManagerComponent* CarSimManagerComponent = NewObject<UCarSimManagerComponent>(Vehicle);
|
||||
CarSimManagerComponent->SimfilePath = Simfile;
|
||||
CarSimManagerComponent->RegisterComponent();
|
||||
Vehicle->SetCarlaMovementComponent(CarSimManagerComponent);
|
||||
CarSimManagerComponent->RegisterComponent();
|
||||
#else
|
||||
UE_LOG(LogCarla, Warning, TEXT("Error: CarSim plugin is not enabled") );
|
||||
#endif
|
||||
|
|
|
@ -47,8 +47,8 @@ void UChronoMovementComponent::CreateChronoMovementComponent(
|
|||
}
|
||||
ChronoMovementComponent->MaxSubsteps = MaxSubsteps;
|
||||
ChronoMovementComponent->MaxSubstepDeltaTime = MaxSubstepDeltaTime;
|
||||
ChronoMovementComponent->RegisterComponent();
|
||||
Vehicle->SetCarlaMovementComponent(ChronoMovementComponent);
|
||||
ChronoMovementComponent->RegisterComponent();
|
||||
#else
|
||||
UE_LOG(LogCarla, Warning, TEXT("Error: Chrono is not enabled") );
|
||||
#endif
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
void UDefaultMovementComponent::CreateDefaultMovementComponent(ACarlaWheeledVehicle* Vehicle)
|
||||
{
|
||||
UDefaultMovementComponent* DefaultMovementComponent = NewObject<UDefaultMovementComponent>(Vehicle);
|
||||
DefaultMovementComponent->RegisterComponent();
|
||||
Vehicle->SetCarlaMovementComponent(DefaultMovementComponent);
|
||||
DefaultMovementComponent->RegisterComponent();
|
||||
}
|
||||
|
||||
void UDefaultMovementComponent::BeginPlay()
|
||||
|
|
Loading…
Reference in New Issue