Remove some actors and components ticks and visibility
This commit is contained in:
parent
913628a53b
commit
6e1905bea7
|
@ -20,6 +20,15 @@ static FDataRouter &GetDataRouter(UWorld *World)
|
||||||
return GameMode->GetDataRouter();
|
return GameMode->GetDataRouter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UAgentComponent::UAgentComponent(const FObjectInitializer& ObjectInitializer)
|
||||||
|
: Super(ObjectInitializer)
|
||||||
|
{
|
||||||
|
bVisible = false;
|
||||||
|
bHiddenInGame = true;
|
||||||
|
bShouldUpdatePhysicsVolume = false;
|
||||||
|
PrimaryComponentTick.bCanEverTick = false;
|
||||||
|
}
|
||||||
|
|
||||||
void UAgentComponent::AcceptVisitor(IAgentComponentVisitor &Visitor) const
|
void UAgentComponent::AcceptVisitor(IAgentComponentVisitor &Visitor) const
|
||||||
{
|
{
|
||||||
unimplemented();
|
unimplemented();
|
||||||
|
|
|
@ -22,6 +22,8 @@ class CARLA_API UAgentComponent : public USceneComponent
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
UAgentComponent(const FObjectInitializer& ObjectInitializer);
|
||||||
|
|
||||||
uint32 GetId() const
|
uint32 GetId() const
|
||||||
{
|
{
|
||||||
return GetTypeHash(this);
|
return GetTypeHash(this);
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
|
|
||||||
ATrafficSignBase::ATrafficSignBase(const FObjectInitializer &ObjectInitializer)
|
ATrafficSignBase::ATrafficSignBase(const FObjectInitializer &ObjectInitializer)
|
||||||
: Super(ObjectInitializer) {
|
: Super(ObjectInitializer) {
|
||||||
|
PrimaryActorTick.bCanEverTick = false;
|
||||||
|
|
||||||
RootComponent =
|
RootComponent =
|
||||||
ObjectInitializer.CreateDefaultSubobject<USceneComponent>(this, TEXT("SceneRootComponent"));
|
ObjectInitializer.CreateDefaultSubobject<USceneComponent>(this, TEXT("SceneRootComponent"));
|
||||||
RootComponent->SetMobility(EComponentMobility::Static);
|
RootComponent->SetMobility(EComponentMobility::Static);
|
||||||
|
@ -16,4 +18,5 @@ ATrafficSignBase::ATrafficSignBase(const FObjectInitializer &ObjectInitializer)
|
||||||
TrafficSignAgentComponent =
|
TrafficSignAgentComponent =
|
||||||
CreateDefaultSubobject<UTrafficSignAgentComponent>(TEXT("TrafficSignAgentComponent"));
|
CreateDefaultSubobject<UTrafficSignAgentComponent>(TEXT("TrafficSignAgentComponent"));
|
||||||
TrafficSignAgentComponent->SetupAttachment(RootComponent);
|
TrafficSignAgentComponent->SetupAttachment(RootComponent);
|
||||||
|
TrafficSignAgentComponent->SetMobility(EComponentMobility::Static);
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,8 +35,11 @@ static AWheeledVehicleAIController *GetController(ACarlaWheeledVehicle *Vehicle)
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
|
|
||||||
// Sets default values
|
// Sets default values
|
||||||
AVehicleSpawnerBase::AVehicleSpawnerBase(const FObjectInitializer& ObjectInitializer) :
|
AVehicleSpawnerBase::AVehicleSpawnerBase(const FObjectInitializer& ObjectInitializer)
|
||||||
Super(ObjectInitializer) {}
|
: Super(ObjectInitializer)
|
||||||
|
{
|
||||||
|
PrimaryActorTick.bCanEverTick = false;
|
||||||
|
}
|
||||||
|
|
||||||
void AVehicleSpawnerBase::BeginPlay()
|
void AVehicleSpawnerBase::BeginPlay()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue