22 static UWorld* FindPlayInEditorAuthorityWorld();
23 static APlayerController* FindPlayInEditorAuthorityPlayerController(
const APlayerController* ClientController);
25 UFUNCTION(BlueprintCallable, Category =
"Base Helpers", meta=(WorldContext=
"WorldContextObject"))
26 static void PrintToLog(
const UObject* WorldContextObject,
const FString& Message,
const bool bWarning =
false,
const bool bError =
false);
27 static void PrintToLogWithCategory(
const UObject* WorldContextObject,
const FLogCategoryBase& Category,
const FString& Message,
const bool bWarning =
false,
const bool bError =
false);
29 UFUNCTION(BlueprintCallable, Category =
"Base Helpers")
32 static int32 GetPlayerTeamID(AController* Controller);
33 static int32 GetPlayerTeamID(APlayerState* PlayerState);
34 UFUNCTION(BlueprintCallable, Category =
"Base Helpers")
35 static int32 GetPlayerTeamIDFromController(AController* Controller);
36 UFUNCTION(BlueprintCallable, Category =
"Base Helpers")
37 static int32 GetPlayerTeamIDFromState(APlayerState* PlayerState);
40 static UClass* GetDefaultBPClass(
const FString&
Location);
41 static TSubclassOf<AActor> GetDefaultActorBPClass(
const FString&
Location);
42 static TSubclassOf<UUserWidget> GetDefaultWidgetBPClass(
const FString&
Location);
43 static UDataTable* GetDefaultDataTable(
const FString&
Location);
45 UFUNCTION(BlueprintCallable, Category =
"Base Helpers")
46 static void PrintVirtualBoneInfo(USkeletalMeshComponent* SkeletalMeshComponent);
48 UFUNCTION(BlueprintCallable, Category =
"Base Helpers")
49 static void ToggleWidgetVisibility(UUserWidget* Widget,
const bool bForceSetVisible =
false,
const bool bForceSetCollapsed =
false);
53 UFUNCTION(BlueprintCallable, Category =
"Base Helpers")
54 static void ToggleInputMode(APlayerController* InController,
const bool bForceGameOnly =
false,
const bool bForceUI =
false,
class UUserWidget* WidgetToFocus =
nullptr);
60 UFUNCTION(BlueprintCallable, Category =
"Base Helpers")
61 static ESoundSource SoundSourceFromName(
const FName& SoundName);
62 UFUNCTION(BlueprintCallable, Category =
"Base Helpers")
63 static FName SoundNameFromSource(
const ESoundSource SoundSource);
66 UFUNCTION(BlueprintCallable, Category=
"Base Helpers|Gameplay Tags")
67 static FString GetGameplayTagName(
const FGameplayTag& GameplayTag);
69 UFUNCTION(BlueprintCallable, Category =
"Base Helpers")
70 static FString DescribeColorHelper(const FColor& Color)
72 const int32 MaxColors = GColorList.GetColorsNum();
73 for (int32 Idx = 0; Idx < MaxColors; Idx++)
75 if (Color == GColorList.GetFColorByIndex(Idx))
77 return GColorList.GetColorNameByIndex(Idx);
81 return FString(TEXT(
"color"));
84 UFUNCTION(BlueprintCallable, Category =
"Character")
85 static TArray<FGameplayTag> GetAllTagsOfCategory(const FName& Category);
90 UFUNCTION(BlueprintPure, BlueprintCallable, Category = "
Base Helpers")
91 static FString GetEnumValue(const FString& BaseString);
94 UFUNCTION(BlueprintCallable, Category = "
Base Helpers")
96 UFUNCTION(BlueprintCallable, Category = "
Base Helpers")
99 UFUNCTION(BlueprintCallable, Category = "
Base Helpers", meta=(WorldContext="WorldContextObject", AutoCreateRefTerm="ActorsToIgnore"))
100 static
bool LineTraceByChannel(const UObject* WorldContextObject, FHitResult&
Hit, const FVector& Start, const FVector& End,
101 const ETraceTypeQuery TraceChannel, const TArray<AActor*>& ActorsToIgnore, const
bool bIgnoreSelf, const
bool bReturnPhysicalMaterial = false, const
bool bTraceComplex = false, const
bool bDebug = false,
102 const FLinearColor TraceColor = FLinearColor::Red, const
float DrawTime = 2.0f);
105 UFUNCTION(BlueprintPure, Category = "
Character")
106 static FVector GetTraceStartLocation(const APlayerController* InController);
108 UFUNCTION(BlueprintPure, Category = "
Character")
109 static FRotator GetTraceStartRotation(const APlayerController* InController);
111 UFUNCTION(BlueprintPure, Category = "
Character")
112 static FVector GetTraceStartEyeLocation(const APawn* Pawn);
114 UFUNCTION(BlueprintPure, Category = "
Character")
115 static FRotator GetTraceStartEyeRotation(const APawn* Pawn);
117 UFUNCTION(BlueprintPure, Category = "Math")
118 static
float CalculateRatio(const int32 Kills, const int32 Deaths);
122 UFUNCTION(BlueprintPure, Category = "
Character")
123 static FVector GetTraceEndLocation(const APlayerController* InController, const
float InLength);
125 UFUNCTION(BlueprintPure, Category = "
Character")
126 static FHitResult SimpleLineTrace(const APlayerController* InController, const
float InLength, const
bool bDebug);
140 UFUNCTION(BlueprintCallable, Category = "
Base Helpers")
141 static UTexture2D* TextureFromWidget(UUserWidget*const Widget, const FVector2D &DrawSize);
145 UFUNCTION(BlueprintPure, Category = "
Damage Types")
146 static
EDamageType DamageTypeToEnum(const UDamageType* DamageType);
147 UFUNCTION(BlueprintPure, Category = "
Damage Types")
148 static
bool IsDamageTypeNonLethal(const UDamageType* DamageType);
150 UFUNCTION(BlueprintPure, Category = "
Debug")
151 static EDrawDebugTrace::Type GetDrawDebugType(const
bool bDebuggingMode);