Rearrange all Blueprint functions into better categories

This commit is contained in:
2024-09-24 18:58:13 -04:00
parent b2aa395c8d
commit 0b7049cf5a
7 changed files with 137 additions and 90 deletions

View File

@@ -0,0 +1,36 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "UtilityLibrary.generated.h"
/**
*
* UlxUtilityLibrary is for functions that are just generally-useful functionality
* that Unreal includes, but for some reason was not made accessible to Blueprints.
*
*/
UCLASS()
class INTEGRATION_API UlxUtilityLibrary : public UObject
{
GENERATED_BODY()
public:
// If condition is false, quit the game, reporting an error message to the log.
//
UFUNCTION(BlueprintCallable, Category = "Luprex|Utility")
static void Assert(bool condition, const FString &ErrorMessage);
// Call a function by name, on any UObject. If the function doesn't exist, calls
// the fallback function instead. If that isn't found either, returns false.
//
UFUNCTION(BlueprintCallable, Meta = (DefaultToSelf = "target"), Category = "Luprex|Utility")
static void CallFunctionByName(UObject *target, const FString &NamePart1, const FString &NamePart2, const FString &fallback);
// Get the axis-aligned bounding box of an actor.
//
UFUNCTION(BlueprintCallable, Meta = (DefaultToSelf = "target"), Category = "Luprex|Utility")
static FBox GetActorBounds(const AActor *target, bool bOnlyCollidingComponents = false, bool bIncludeFromChildActors = false);
};