2022-05-23 18:41:30 +00:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2022-09-13 07:18:28 +00:00
|
|
|
#include "Containers/Array.h"
|
|
|
|
#include "Containers/UnrealString.h"
|
2022-05-23 18:41:30 +00:00
|
|
|
#include "Kismet/BlueprintFunctionLibrary.h"
|
2022-09-13 07:18:28 +00:00
|
|
|
#include "Templates/SubclassOf.h"
|
|
|
|
#include "UObject/UObjectGlobals.h"
|
2022-05-23 18:41:30 +00:00
|
|
|
|
|
|
|
#include "LyraDevelopmentStatics.generated.h"
|
|
|
|
|
2022-09-13 07:18:28 +00:00
|
|
|
class UClass;
|
|
|
|
class UObject;
|
2022-05-23 18:41:30 +00:00
|
|
|
class UWorld;
|
2022-09-13 07:18:28 +00:00
|
|
|
struct FAssetData;
|
|
|
|
struct FFrame;
|
2022-05-23 18:41:30 +00:00
|
|
|
|
|
|
|
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);
|
|
|
|
};
|