Files
UnrealEngine/Engine/Plugins/Runtime/StateTree/Source/StateTreeModule/Private/StateTreeInstanceDataHelpers.h
2025-05-18 13:04:45 +08:00

30 lines
1.0 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "StateTreeInstanceData.h"
namespace UE::StateTree::InstanceData::Private
{
/** @return whether the handle is valid when it's an instance data type. */
[[nodiscard]] bool IsActiveInstanceHandleSourceValid(
const FStateTreeInstanceStorage& Storage,
const FStateTreeExecutionFrame& CurrentFrame,
const FStateTreeDataHandle& Handle);
/** @return whether the handle is valid relative to the given frame. */
[[nodiscard]] bool IsHandleSourceValid(
const FStateTreeInstanceStorage& InstanceStorage,
const FStateTreeExecutionFrame* ParentFrame,
const FStateTreeExecutionFrame& CurrentFrame,
const FStateTreeDataHandle& Handle);
/** @return data view of the specified handle in temporary instance. */
[[nodiscard]] FStateTreeDataView GetTemporaryDataView(
FStateTreeInstanceStorage& InstanceStorage,
const FStateTreeExecutionFrame* ParentFrame,
const FStateTreeExecutionFrame& CurrentFrame,
const FStateTreeDataHandle& Handle);
} // namespace