Files
UnrealEngineUWP/Engine/Plugins/Runtime/StateTree/Source/StateTreeModule/Public/StateTreeDelegates.h
mikko mononen f6770cf154 StateTree: Parametrized states
- Added specific "subtree" states which can be linked to via a "linked" state
- Subtrees can only bind data back to the their root state (or tree "global" data)
- Added property bag based parameters to subtree and linked states
- Update (transient) property bag structs before resolving property paths
- Linked states reflect their parameters from the state they link to
- Added property binding to and from parameters
- Relaxed the property binding to fail if the source data is not available
- Allow enter conditions to bind to tasks, and fail the expression if trying to access unaccessible data
- Added icon for linked and subtree states
- Added source type for all binding source structs
- Added UStateTreeEditorData::VisitHierarchy to simplify iterating over all states

#jira UE-147507
#rb Yoan.StAmant
#preflight 626a47182d28b9d0f77223f5

[CL 19954567 by mikko mononen in ue5-main branch]
2022-04-28 03:54:07 -04:00

47 lines
1.7 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Delegates/Delegate.h"
class UStateTree;
namespace UE::StateTree::Delegates
{
#if WITH_EDITOR
/** Called when linkable name in a StateTree has changed. */
DECLARE_MULTICAST_DELEGATE_OneParam(FOnIdentifierChanged, const UStateTree& /*StateTree*/);
extern STATETREEMODULE_API FOnIdentifierChanged OnIdentifierChanged;
/**
* Called when schema of the StateTree EditorData has changed.
* This is used to refresh the asset editor.
* Note that this is NOT called when updating the StateTree schema from the EditorData on successful compilation.
*/
DECLARE_MULTICAST_DELEGATE_OneParam(FOnSchemaChanged, const UStateTree& /*StateTree*/);
extern STATETREEMODULE_API FOnSchemaChanged OnSchemaChanged;
/**
* Called when parameters of the StateTree EditorData changed.
* This should mainly used by the asset editor to maintain consistency in the UI for manipulations on the EditorData
* until the tree gets compiled.
*/
DECLARE_MULTICAST_DELEGATE_OneParam(FOnParametersChanged, const UStateTree& /*StateTree*/);
extern STATETREEMODULE_API FOnParametersChanged OnParametersChanged;
/**
* Called when parameters of a StateTree State changed.
* This should mainly used by the asset editor to maintain consistency in the UI for manipulations.
*/
DECLARE_MULTICAST_DELEGATE_TwoParams(FOnStateParametersChanged, const UStateTree& /*StateTree*/, const FGuid /*StateID*/);
extern STATETREEMODULE_API FOnStateParametersChanged OnStateParametersChanged;
/** Called when compilation succeeds */
DECLARE_MULTICAST_DELEGATE_OneParam(FOnPostCompile, const UStateTree& /*StateTree*/);
extern STATETREEMODULE_API FOnPostCompile OnPostCompile;
#endif
}; // UE::StateTree::Delegates