11UCarlaLight::UCarlaLight()
13 PrimaryComponentTick.bCanEverTick =
false;
16void UCarlaLight::BeginPlay()
23void UCarlaLight::RegisterLight()
30 UWorld *World = GetWorld();
36 RegisterLightWithWeather();
40void UCarlaLight::OnComponentDestroyed(
bool bDestroyingHierarchy)
42 Super::OnComponentDestroyed(bDestroyingHierarchy);
45void UCarlaLight::EndPlay(
const EEndPlayReason::Type EndPlayReason)
47 UWorld *World = GetWorld();
53 Super::EndPlay(EndPlayReason);
56void UCarlaLight::SetLightIntensity(
float Intensity)
58 LightIntensity = Intensity;
62float UCarlaLight::GetLightIntensity()
const
64 return LightIntensity;
67void UCarlaLight::SetLightColor(FLinearColor Color)
74FLinearColor UCarlaLight::GetLightColor()
const
79void UCarlaLight::SetLightOn(
bool bOn)
86bool UCarlaLight::GetLightOn()
const
119 LightColor = LightState.
_color;
126FVector UCarlaLight::GetLocation()
const
128 auto Location = GetOwner()->GetActorLocation();
138int UCarlaLight::GetId()
const
143void UCarlaLight::SetId(
int InId)
148void UCarlaLight::RecordLightChange()
const
153 auto* Recorder = Episode->GetRecorder();
154 if (Recorder && Recorder->IsEnabled())
156 Recorder->AddEventLightSceneChanged(
this);
Base class for the CARLA Game Mode.
ALargeMapManager * GetLMManager() const
FVector LocalToGlobalLocation(const FVector &InLocation) const
void RegisterLight(UCarlaLight *CarlaLight)
void UnregisterLight(UCarlaLight *CarlaLight)
static UCarlaEpisode * GetCurrentEpisode(const UObject *WorldContextObject)
static ACarlaGameModeBase * GetGameMode(const UObject *WorldContextObject)