File size: 2,248 Bytes
7fd553e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | // Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Kismet/BlueprintFunctionLibrary.h"
#include "Templates/SubclassOf.h"
#include "LyraDevelopmentStatics.generated.h"
class UClass;
class UObject;
class UWorld;
struct FAssetData;
struct FFrame;
UCLASS()
class ULyraDevelopmentStatics : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
// Should game logic skip directly to gameplay (skipping any match warmup / waiting for players / etc... aspects)
// Will always return false except when playing in the editor and bTestFullGameFlowInPIE (in Lyra Developer Settings) is false
UFUNCTION(BlueprintCallable, Category="Lyra")
static bool ShouldSkipDirectlyToGameplay();
// Should game logic load cosmetic backgrounds in the editor?
// Will always return true except when playing in the editor and bSkipLoadingCosmeticBackgroundsInPIE (in Lyra Developer Settings) is true
UFUNCTION(BlueprintCallable, Category = "Lyra", meta=(ExpandBoolAsExecs="ReturnValue"))
static bool ShouldLoadCosmeticBackgrounds();
// Should game logic load cosmetic backgrounds in the editor?
// Will always return true except when playing in the editor and bSkipLoadingCosmeticBackgroundsInPIE (in Lyra Developer Settings) is true
UFUNCTION(BlueprintCallable, Category = "Lyra")
static bool CanPlayerBotsAttack();
// Finds the most appropriate play-in-editor world to run 'server' cheats on
// This might be the only world if running standalone, the listen server, or the dedicated server
static UWorld* FindPlayInEditorAuthorityWorld();
// Tries to find a class by a short name (with some heuristics to improve the usability when done via a cheat console)
static UClass* FindClassByShortName(const FString& SearchToken, UClass* DesiredBaseClass, bool bLogFailures = true);
template <typename DesiredClass>
static TSubclassOf<DesiredClass> FindClassByShortName(const FString& SearchToken, bool bLogFailures = true)
{
return FindClassByShortName(SearchToken, DesiredClass::StaticClass(), bLogFailures);
}
private:
static TArray<FAssetData> GetAllBlueprints();
static UClass* FindBlueprintClass(const FString& TargetNameRaw, UClass* DesiredBaseClass);
};
|