Static functions turned into Blueprint function libraries to help simplify spawning bug placer pawns.

This commit is contained in:
Jamie Greunbaum 2023-04-10 15:35:26 -04:00
parent cf93bea872
commit 80afa2a4b4
3 changed files with 9 additions and 9 deletions

Binary file not shown.

View File

@ -203,7 +203,7 @@ void ABugPlacerPawn::ExitCanceled()
}
void ABugPlacerPawn::SpawnBugPlacerPawn(const UObject *WorldContextObject, TSubclassOf<ABugPlacerPawn> Class)
void ABugPlacerPawn::SBPP(const UObject *WorldContextObject, TSubclassOf<ABugPlacerPawn> Class)
{
const FTransform &Transform = UGameplayStatics::GetPlayerCameraManager(WorldContextObject, 0)->GetActorTransform();
FActorSpawnParameters SpawnParams;
@ -211,7 +211,7 @@ void ABugPlacerPawn::SpawnBugPlacerPawn(const UObject *WorldContextObject, TSubc
WorldContextObject->GetWorld()->SpawnActor<ABugPlacerPawn>(Class, Transform, SpawnParams);
}
void ABugPlacerPawn::ShowBugMarkersInLevel(const UObject *WorldContextObject)
void ABugPlacerPawn::SBMIL(const UObject *WorldContextObject)
{
if (UBugMarkerSubsystem *BugMarkerSubsystem = UGameplayStatics::GetPlayerController(WorldContextObject, 0)->GetLocalPlayer()->GetSubsystem<UBugMarkerSubsystem>())
{
@ -219,7 +219,7 @@ void ABugPlacerPawn::ShowBugMarkersInLevel(const UObject *WorldContextObject)
}
}
void ABugPlacerPawn::HideBugMarkersInLevel(const UObject *WorldContextObject)
void ABugPlacerPawn::HBMIL(const UObject *WorldContextObject)
{
if (UBugMarkerSubsystem *BugMarkerSubsystem = UGameplayStatics::GetPlayerController(WorldContextObject, 0)->GetLocalPlayer()->GetSubsystem<UBugMarkerSubsystem>())
{

View File

@ -32,12 +32,12 @@ public:
UFUNCTION(BlueprintImplementableEvent)
void ShowCrosshairs(const bool bShow);
UFUNCTION(BlueprintCallable, meta=(WorldContext="WorldContextObject"))
static void SpawnBugPlacerPawn(const UObject *WorldContextObject, TSubclassOf<ABugPlacerPawn> Class);
UFUNCTION(BlueprintCallable, meta=(WorldContext="WorldContextObject"))
static void ShowBugMarkersInLevel(const UObject *WorldContextObject);
UFUNCTION(BlueprintCallable, meta=(WorldContext="WorldContextObject"))
static void HideBugMarkersInLevel(const UObject *WorldContextObject);
UFUNCTION(BlueprintCallable, Category="Unrealzilla C++ Native", meta=(WorldContext="WorldContextObject"))
static void SBPP(const UObject *WorldContextObject, TSubclassOf<ABugPlacerPawn> Class);
UFUNCTION(BlueprintCallable, Category="Unrealzilla C++ Native", meta=(WorldContext="WorldContextObject"))
static void SBMIL(const UObject *WorldContextObject);
UFUNCTION(BlueprintCallable, Category="Unrealzilla C++ Native", meta=(WorldContext="WorldContextObject"))
static void HBMIL(const UObject *WorldContextObject);
protected:
UFUNCTION(BlueprintCallable)