UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
AIBlueprintHelperLibrary.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
8#pragma once
9
10#include "CoreMinimal.h"
13#include "GameFramework/Pawn.h"
15#include "AIBlueprintHelperLibrary.generated.h"
16
17class AAIController;
19class UAnimInstance;
20class UBehaviorTree;
21class UBlackboardComponent;
22class UNavigationPath;
24
25UCLASS(meta=(ScriptName="AIHelperLibrary"), MinimalAPI)
27{
29
30 UFUNCTION(BlueprintCallable, meta=(WorldContext="WorldContextObject", BlueprintInternalUseOnly = "TRUE"))
31 static AIMODULE_API UAIAsyncTaskBlueprintProxy* CreateMoveToProxyObject(UObject* WorldContextObject, APawn* Pawn, FVector Destination, AActor* TargetActor = NULL, float AcceptanceRadius = 5.f, bool bStopOnOverlap = false);
32
33 UFUNCTION(BlueprintCallable, Category="AI", meta=(DefaultToSelf="MessageSource"))
34 static AIMODULE_API void SendAIMessage(APawn* Target, FName Message, UObject* MessageSource, bool bSuccess = true);
35
44 UFUNCTION(BlueprintCallable, Category="AI", meta=(WorldContext="WorldContextObject", UnsafeDuringActorConstruction="true", AdvancedDisplay = "Owner"))
45 static AIMODULE_API APawn* SpawnAIFromClass(UObject* WorldContextObject, TSubclassOf<APawn> PawnClass, UBehaviorTree* BehaviorTree, FVector Location, FRotator Rotation = FRotator::ZeroRotator, bool bNoCollisionFail = false, AActor* Owner = nullptr);
46
49 UFUNCTION(BlueprintPure, Category = "AI", meta = (DefaultToSelf = "ControlledObject"))
50 static AIMODULE_API AAIController* GetAIController(AActor* ControlledActor);
51
52 UFUNCTION(BlueprintPure, Category="AI", meta=(DefaultToSelf="Target"))
53 static AIMODULE_API UBlackboardComponent* GetBlackboard(AActor* Target);
54
56 UFUNCTION(BlueprintCallable, Category = "Animation", BlueprintAuthorityOnly, meta = (DefaultToSelf = "AnimInstance"))
57 static AIMODULE_API void LockAIResourcesWithAnimation(UAnimInstance* AnimInstance, bool bLockMovement, bool LockAILogic);
58
60 UFUNCTION(BlueprintCallable, Category = "Animation", BlueprintAuthorityOnly, meta = (DefaultToSelf = "AnimInstance"))
61 static AIMODULE_API void UnlockAIResourcesWithAnimation(UAnimInstance* AnimInstance, bool bUnlockMovement, bool UnlockAILogic);
62
63 UFUNCTION(BlueprintPure, Category = "AI")
64 static AIMODULE_API bool IsValidAILocation(FVector Location);
65
66 UFUNCTION(BlueprintPure, Category = "AI")
67 static AIMODULE_API bool IsValidAIDirection(FVector DirectionVector);
68
69 UFUNCTION(BlueprintPure, Category = "AI")
70 static AIMODULE_API bool IsValidAIRotation(FRotator Rotation);
71
76 UFUNCTION(BlueprintPure, Category = "AI", meta = (UnsafeDuringActorConstruction = "true"))
77 static AIMODULE_API UNavigationPath* GetCurrentPath(AController* Controller);
78
80 UFUNCTION(BlueprintPure, Category = "AI", meta = (UnsafeDuringActorConstruction = "true"))
81 static AIMODULE_API const TArray<FVector> GetCurrentPathPoints(AController* Controller);
82
84 UFUNCTION(BlueprintPure, Category = "AI", meta = (UnsafeDuringActorConstruction = "true"))
85 static AIMODULE_API int32 GetCurrentPathIndex(const AController* Controller);
86
88 UFUNCTION(BlueprintPure, Category = "AI", meta = (UnsafeDuringActorConstruction = "true"))
89 static AIMODULE_API int32 GetNextNavLinkIndex(const AController* Controller);
90
91 UFUNCTION(BlueprintCallable, Category = "AI|Navigation")
92 static AIMODULE_API void SimpleMoveToActor(AController* Controller, const AActor* Goal);
93
94 UFUNCTION(BlueprintCallable, Category = "AI|Navigation")
95 static AIMODULE_API void SimpleMoveToLocation(AController* Controller, const FVector& Goal);
96
97private:
98 static UPathFollowingComponent* GetPathComp(const AController* Controller);
99};
#define NULL
Definition oodle2base.h:134
bool bSuccess
Definition ConvexDecomposition3.cpp:819
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UFUNCTION(...)
Definition ObjectMacros.h:745
#define GENERATED_UCLASS_BODY(...)
Definition ObjectMacros.h:768
#define UCLASS(...)
Definition ObjectMacros.h:776
Definition AIController.h:91
Definition Actor.h:257
Definition Controller.h:41
Definition NameTypes.h:617
Definition Array.h:670
Definition SubclassOf.h:30
Definition AIAsyncTaskBlueprintProxy.h:18
Definition AIBlueprintHelperLibrary.h:27
Definition AnimInstance.h:353
Definition BehaviorTree.h:16
Definition BlueprintFunctionLibrary.h:16
Definition NavigationPath.h:25
Definition Object.h:95
Definition PathFollowingComponent.h:217
float AcceptanceRadius
Definition PathFollowingComponent.h:478
static CORE_API const TRotator< double > ZeroRotator
Definition Rotator.h:57