Fixed light registration issues
This commit is contained in:
parent
f4334551a0
commit
6625d66e78
|
@ -230,10 +230,6 @@ void ACarlaGameModeBase::BeginPlay()
|
||||||
for(UCarlaLight* Light : Lights)
|
for(UCarlaLight* Light : Lights)
|
||||||
{
|
{
|
||||||
Light->RegisterLight();
|
Light->RegisterLight();
|
||||||
if(!Light->HasBegunPlay())
|
|
||||||
{
|
|
||||||
Light->BeginPlay();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EnableOverlapEvents();
|
EnableOverlapEvents();
|
||||||
|
|
|
@ -33,7 +33,7 @@ void UCarlaLight::RegisterLight()
|
||||||
UCarlaLightSubsystem* CarlaLightSubsystem = World->GetSubsystem<UCarlaLightSubsystem>();
|
UCarlaLightSubsystem* CarlaLightSubsystem = World->GetSubsystem<UCarlaLightSubsystem>();
|
||||||
CarlaLightSubsystem->RegisterLight(this);
|
CarlaLightSubsystem->RegisterLight(this);
|
||||||
}
|
}
|
||||||
|
RegisterLightWithWeather();
|
||||||
bRegistered = true;
|
bRegistered = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,9 @@ public:
|
||||||
UFUNCTION(BlueprintImplementableEvent, BlueprintCallable, Category = "Carla Light")
|
UFUNCTION(BlueprintImplementableEvent, BlueprintCallable, Category = "Carla Light")
|
||||||
void UpdateLights();
|
void UpdateLights();
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintImplementableEvent, BlueprintCallable, Category = "Carla Light")
|
||||||
|
void RegisterLightWithWeather();
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, Category = "Carla Light")
|
UFUNCTION(BlueprintCallable, Category = "Carla Light")
|
||||||
void SetLightIntensity(float Intensity);
|
void SetLightIntensity(float Intensity);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue