2024-04-12 23:31:49 -07:00
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "Engine/LevelScriptActor.h"
|
|
|
|
|
|
2024-04-13 02:32:52 -07:00
|
|
|
|
#include "GasaCommon.h"
|
|
|
|
|
|
2024-04-12 23:31:49 -07:00
|
|
|
|
#include "GasaLevelScriptActor.generated.h"
|
|
|
|
|
|
|
|
|
|
UCLASS(Blueprintable)
|
|
|
|
|
class GASA_API AGasaLevelScriptActor : public ALevelScriptActor
|
|
|
|
|
{
|
|
|
|
|
GENERATED_BODY()
|
|
|
|
|
public:
|
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Post Process")
|
|
|
|
|
TObjectPtr<APostProcessVolume> GlobalPPV;
|
|
|
|
|
|
|
|
|
|
#pragma region Actor
|
|
|
|
|
void BeginPlay() override;
|
|
|
|
|
#pragma region endActor
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
namespace Gasa
|
|
|
|
|
{
|
|
|
|
|
inline
|
|
|
|
|
AGasaLevelScriptActor* GetLevelActor(UObject* Context, ULevel* OwnerLevel = nullptr) {
|
2024-04-13 02:32:52 -07:00
|
|
|
|
UWorld* World = GEngine->GetWorldFromContextObject(Context, EGetWorldErrorMode::LogAndReturnNull);
|
|
|
|
|
if (World == nullptr)
|
|
|
|
|
{
|
|
|
|
|
Log("World is null... are you running in a proper context?", ELogV::Error);
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
2024-04-12 23:31:49 -07:00
|
|
|
|
return Cast<AGasaLevelScriptActor>(World->GetLevelScriptActor(OwnerLevel));
|
|
|
|
|
}
|
|
|
|
|
}
|