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