UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
AISenseConfig.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
8#include "UObject/Object.h"
11#include "Perception/AISense.h"
12#include "AISenseConfig.generated.h"
13
16
17UCLASS(ClassGroup = AI, abstract, EditInlineNew, config=Game, MinimalAPI)
19{
21
22protected:
23 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Sense, AdvancedDisplay)
24 FColor DebugColor;
25
30 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Sense, meta = (ClampMin = "0.0", UIMin = "0.0", Units="Seconds"))
31 float MaxAge;
32
34 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Sense)
35 uint32 bStartsEnabled : 1;
36
37 // name of sense
38 mutable FString CachedSenseName;
39
40public:
42
43 AIMODULE_API virtual TSubclassOf<UAISense> GetSenseImplementation() const;
44
45 AIMODULE_API FAISenseID GetSenseID() const;
46 AIMODULE_API FString GetSenseName() const;
47 FColor GetDebugColor() const { return DebugColor; }
48 void SetMaxAge(const float NewMaxAge) { MaxAge = NewMaxAge; }
49 float GetMaxAge() const { return MaxAge == 0.f ? FAIStimulus::NeverHappenedAge : MaxAge; }
50
51 UE_DEPRECATED(5.4, "Use GetStartsEnabled instead")
52 bool IsEnabled() const { return bStartsEnabled; }
53
54 bool GetStartsEnabled() const { return bStartsEnabled; }
55
58 void SetStartsEnabled(bool bEnabled) { bStartsEnabled = bEnabled; }
59
60#if WITH_GAMEPLAY_DEBUGGER_MENU
62#endif // WITH_GAMEPLAY_DEBUGGER_MENU
63};
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
const bool
Definition NetworkReplayStreaming.h:178
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define UCLASS(...)
Definition ObjectMacros.h:776
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition GameplayDebuggerCategory.h:49
Definition UObjectGlobals.h:1292
Definition SubclassOf.h:30
Definition AISenseConfig.h:19
float GetMaxAge() const
Definition AISenseConfig.h:49
void SetStartsEnabled(bool bEnabled)
Definition AISenseConfig.h:58
void SetMaxAge(const float NewMaxAge)
Definition AISenseConfig.h:48
bool GetStartsEnabled() const
Definition AISenseConfig.h:54
Definition AISense.h:21
Definition Object.h:95
static AIMODULE_API const float NeverHappenedAge
Definition AIPerceptionTypes.h:133
Definition Color.h:486