15#include "CoreMinimal.h"
16#include "Components/ActorComponent.h"
17#include "CarlaLight.generated.h"
21#define CARLA_ENUM_FROM_RPC(e) static_cast<uint8>(carla::rpc::LightState::LightGroup:: e)
33#undef CARLA_ENUM_FROM_RPC
36UCLASS(Blueprintable, BlueprintType, ClassGroup=(Custom), meta=(BlueprintSpawnableComponent))
37class CARLA_API UCarlaLight :
public UActorComponent
47 void EndPlay(const EEndPlayReason::Type EndPlayReason)
override;
49 void OnComponentDestroyed(
bool bDestroyingHierarchy)
override;
51 UFUNCTION(BlueprintCallable, Category = "Carla Light")
54 UFUNCTION(BlueprintImplementableEvent, BlueprintCallable, Category = "Carla Light")
57 UFUNCTION(BlueprintImplementableEvent, BlueprintCallable, Category = "Carla Light")
58 void RegisterLightWithWeather();
60 UFUNCTION(BlueprintCallable, Category = "Carla Light")
61 void SetLightIntensity(
float Intensity);
63 UFUNCTION(BlueprintPure, Category = "Carla Light")
64 float GetLightIntensity() const;
66 UFUNCTION(BlueprintCallable, Category = "Carla Light")
67 void SetLightColor(FLinearColor Color);
69 UFUNCTION(BlueprintPure, Category = "Carla Light")
70 FLinearColor GetLightColor() const;
72 UFUNCTION(BlueprintCallable, Category = "Carla Light")
73 void SetLightOn(
bool bOn);
76 UFUNCTION(BlueprintPure, Category = "Carla Light")
77 bool GetLightOn() const;
79 UFUNCTION(BlueprintCallable, Category = "Carla Light")
82 UFUNCTION(BlueprintPure, Category = "Carla Light")
90 FVector GetLocation() const;
92 UFUNCTION(BlueprintPure, Category = "Carla Light")
95 UFUNCTION(BlueprintCallable, Category = "Carla Light")
100 UPROPERTY(EditAnywhere, Category = "Carla Light")
103 UPROPERTY(EditAnywhere, Category = "Carla Light")
104 float LightIntensity;
107 UPROPERTY(EditAnywhere, Category = "Carla Light")
108 FLinearColor LightColor;
110 UPROPERTY(EditAnywhere, Category = "Carla Light")
113 UPROPERTY(EditAnywhere, Category = "Carla Light")
118 void RecordLightChange() const;
120 bool bRegistered = false;
FVehicleLightState LightState
#define CARLA_ENUM_FROM_RPC(e)