You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#preflight 62da4a10185da2495f802bae #ROBOMERGE-AUTHOR: mikko.mononen #ROBOMERGE-SOURCE: CL 21217415 via CL 21217580 via CL 21217683 #ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824) [CL 21218420 by mikko mononen in ue5-main branch]
61 lines
1.5 KiB
C++
61 lines
1.5 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "StateTreeTypes.h"
|
|
#include "StateTreeReference.generated.h"
|
|
|
|
class UStateTree;
|
|
|
|
/**
|
|
* Struct to hold reference to a StateTree asset along with values to parameterized it.
|
|
*/
|
|
USTRUCT()
|
|
struct STATETREEMODULE_API FStateTreeReference
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
FStateTreeReference();
|
|
~FStateTreeReference();
|
|
|
|
UPROPERTY(EditAnywhere, Category = "")
|
|
TObjectPtr<UStateTree> StateTree = nullptr;
|
|
|
|
UPROPERTY(EditAnywhere, Category = "", meta = (FixedLayout))
|
|
FInstancedPropertyBag Parameters;
|
|
|
|
#if WITH_EDITOR
|
|
void PostSerialize(const FArchive& Ar);
|
|
|
|
/**
|
|
* Enforce self parameters to be compatible with those exposed by the selected StateTree asset.
|
|
*/
|
|
void SyncParameters() { SyncParameters(Parameters); }
|
|
|
|
/**
|
|
* Sync provided parameters to be compatible with those exposed by the selected StateTree asset.
|
|
*/
|
|
void SyncParameters(FInstancedPropertyBag& ParametersToSync) const;
|
|
|
|
/**
|
|
* Indicates if current parameters are compatible with those available in the selected StateTree asset.
|
|
* @return true when parameters requires to be synced to be compatible with those available in the selected StateTree asset, false otherwise.
|
|
*/
|
|
bool RequiresParametersSync() const;
|
|
|
|
private:
|
|
FDelegateHandle PIEHandle;
|
|
#endif
|
|
};
|
|
|
|
#if WITH_EDITORONLY_DATA
|
|
template<>
|
|
struct TStructOpsTypeTraits<FStateTreeReference> : public TStructOpsTypeTraitsBase2<FStateTreeReference>
|
|
{
|
|
enum
|
|
{
|
|
WithPostSerialize = true,
|
|
};
|
|
};
|
|
#endif
|