// 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); };