2021-09-28 13:33:17 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2022-04-12 15:55:39 -04:00
|
|
|
#include "Delegates/Delegate.h"
|
2021-09-28 13:33:17 -04:00
|
|
|
|
|
|
|
|
class UStateTree;
|
|
|
|
|
|
|
|
|
|
namespace UE::StateTree::Delegates
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
#if WITH_EDITOR
|
2022-04-12 15:55:39 -04:00
|
|
|
/** Called when linkable name in a StateTree has changed. */
|
2021-09-28 13:33:17 -04:00
|
|
|
DECLARE_MULTICAST_DELEGATE_OneParam(FOnIdentifierChanged, const UStateTree& /*StateTree*/);
|
|
|
|
|
extern STATETREEMODULE_API FOnIdentifierChanged OnIdentifierChanged;
|
|
|
|
|
|
2022-04-12 15:55:39 -04:00
|
|
|
/**
|
|
|
|
|
* 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.
|
|
|
|
|
*/
|
2021-09-28 13:33:17 -04:00
|
|
|
DECLARE_MULTICAST_DELEGATE_OneParam(FOnSchemaChanged, const UStateTree& /*StateTree*/);
|
|
|
|
|
extern STATETREEMODULE_API FOnSchemaChanged OnSchemaChanged;
|
2022-04-12 15:55:39 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 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;
|
2022-04-28 03:54:07 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 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;
|
|
|
|
|
|
2023-06-16 02:29:34 -04:00
|
|
|
/**
|
|
|
|
|
* Called when breakpoints of the StateTree EditorData changed.
|
|
|
|
|
* This should mainly used by the asset editor to update the debugger.
|
|
|
|
|
*/
|
|
|
|
|
DECLARE_MULTICAST_DELEGATE_OneParam(FOnBreakpointsChanged, const UStateTree& /*StateTree*/);
|
|
|
|
|
extern STATETREEMODULE_API FOnBreakpointsChanged OnBreakpointsChanged;
|
|
|
|
|
|
2022-04-12 15:55:39 -04:00
|
|
|
/** Called when compilation succeeds */
|
|
|
|
|
DECLARE_MULTICAST_DELEGATE_OneParam(FOnPostCompile, const UStateTree& /*StateTree*/);
|
|
|
|
|
extern STATETREEMODULE_API FOnPostCompile OnPostCompile;
|
2022-09-15 13:53:23 -04:00
|
|
|
|
|
|
|
|
/** Request StateTree compilation. Works only in editor. */
|
|
|
|
|
DECLARE_DELEGATE_RetVal_OneParam(bool, FOnRequestCompile, UStateTree& /*StateTreeToCompile*/);
|
|
|
|
|
extern STATETREEMODULE_API FOnRequestCompile OnRequestCompile;
|
2021-09-28 13:33:17 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
}; // UE::StateTree::Delegates
|
|
|
|
|
|