Files
UnrealEngineUWP/Engine/Plugins/Runtime/SmartObjects/Source/SmartObjectsModule/Public/SmartObjectBlueprintFunctionLibrary.h
bob tellez 5a84e8a7d8 [Backout] - CL23746516
[FYI] Yoan.StAmant
Original CL Desc
-----------------------------------------------------------------
[SmartObject] updated the smartobject blueprint library:
- renamed 'K2_SetSmartObjectEnabled' to 'AddOrRemoveSmartObject' since 'Enabled= false' is a concept used when the object is no longer available for queries but active interactions can finish.
- added functions to add to/remove from the simulation all smart objects from a single or a list of actors.
- added functions to enable/disable smart objects on a single or a list of actors.
#jira UE-165689
#rb mikko.mononen
#rb maxime.mercier
#rb patrick.carroll
#preflight 63c6fda33f587d9e1403726c

[CL 23752173 by bob tellez in ue5-main branch]
2023-01-18 01:06:52 -05:00

37 lines
1.8 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Kismet/BlueprintFunctionLibrary.h"
#include "SmartObjectRuntime.h"
#include "SmartObjectBlueprintFunctionLibrary.generated.h"
struct FGameplayTagContainer;
class UBlackboardComponent;
class AAIController;
class UBTNode;
UCLASS(meta = (ScriptName = "SmartObjectLibrary"))
class SMARTOBJECTSMODULE_API USmartObjectBlueprintFunctionLibrary : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable, Category = "SmartObject")
static FSmartObjectClaimHandle GetValueAsSOClaimHandle(UBlackboardComponent* BlackboardComponent, const FName& KeyName);
UFUNCTION(BlueprintCallable, Category = "SmartObject")
static void SetValueAsSOClaimHandle(UBlackboardComponent* BlackboardComponent, const FName& KeyName, FSmartObjectClaimHandle Value);
UFUNCTION(BlueprintCallable, Category = "SmartObject")
static bool IsValidSmartObjectClaimHandle(const FSmartObjectClaimHandle Handle) { return Handle.IsValid(); }
UFUNCTION(BlueprintCallable, Category = "SmartObject", meta = (DisplayName = "SetSmartObjectEnabled"))
static bool K2_SetSmartObjectEnabled(AActor* SmartObject, const bool bEnabled);
UFUNCTION(BlueprintCallable, Category = "AI|BehaviorTree", meta = (HidePin = "NodeOwner", DefaultToSelf = "NodeOwner", DisplayName = "Set Blackboard Value As Smart Object Claim Handle"))
static void SetBlackboardValueAsSOClaimHandle(UBTNode* NodeOwner, const FBlackboardKeySelector& Key, const FSmartObjectClaimHandle& Value);
UFUNCTION(BlueprintPure, Category = "AI|BehaviorTree", meta = (HidePin = "NodeOwner", DefaultToSelf = "NodeOwner", DisplayName = "Get Blackboard Value As Smart Object Claim Handle"))
static FSmartObjectClaimHandle GetBlackboardValueAsSOClaimHandle(UBTNode* NodeOwner, const FBlackboardKeySelector& Key);
};