UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
PropertyAccessUtil.h File Reference
#include "Containers/UnrealString.h"
#include "CoreGlobals.h"
#include "CoreMinimal.h"
#include "HAL/Platform.h"
#include "Misc/EnumClassFlags.h"
#include "Templates/Function.h"
#include "Templates/UniquePtr.h"
#include "UObject/NameTypes.h"
#include "UObject/ObjectMacros.h"
#include "UObject/UnrealType.h"
#include "PropertyAccessUtil.generated.h"

Go to the source code of this file.

Classes

struct  FPropertyAccessChangeNotify
 

Namespaces

namespace  PropertyAccessUtil
 

Typedefs

using FPropertyAccessGetFunc = TFunctionRef< bool()>
 
using FPropertyAccessSetFunc = TFunctionRef< bool(const FPropertyAccessChangeNotify *)>
 
using FPropertyAccessBuildChangeNotifyFunc = TFunctionRef< TUniquePtr< FPropertyAccessChangeNotify >()>
 

Enumerations

enum class  EPropertyAccessResultFlags : uint8 {
  Success = 0 , PermissionDenied = 1<<0 , ConversionFailed = 1<<1 , AccessProtected = 1<<4 ,
  CannotEditTemplate = 1<<5 , CannotEditInstance = 1<<6 , ReadOnly = 1<<7
}
 
enum class  EPropertyAccessChangeNotifyMode : uint8 { Default , Never , Always }
 

Functions

 ENUM_CLASS_FLAGS (EPropertyAccessResultFlags)
 
EPropertyAccessResultFlags PropertyAccessUtil::GetPropertyValue_Object (const FProperty *InObjectProp, const UObject *InObject, const FProperty *InDestProp, void *InDestValue, const int32 InArrayIndex)
 
EPropertyAccessResultFlags PropertyAccessUtil::GetPropertyValue_InContainer (const FProperty *InContainerProp, const void *InContainerData, const FProperty *InDestProp, void *InDestValue, const int32 InArrayIndex)
 
EPropertyAccessResultFlags PropertyAccessUtil::GetPropertyValue_DirectSingle (const FProperty *InSrcProp, const void *InSrcValue, const FProperty *InDestProp, void *InDestValue)
 
EPropertyAccessResultFlags PropertyAccessUtil::GetPropertyValue_DirectComplete (const FProperty *InSrcProp, const void *InSrcValue, const FProperty *InDestProp, void *InDestValue)
 
EPropertyAccessResultFlags PropertyAccessUtil::GetPropertyValue (const FPropertyAccessGetFunc &InGetFunc)
 
EPropertyAccessResultFlags PropertyAccessUtil::CanGetPropertyValue (const FProperty *InProp)
 
bool PropertyAccessUtil::GetArchetypeInstancesInheritingPropertyValue (const FProperty *InObjectProp, UObject *InObject, TArray< UObject * > &OutArchetypeInstances)
 
bool PropertyAccessUtil::GetArchetypeInstancesInheritingPropertyValue_AsContainerData (const FProperty *InObjectProp, UObject *InObject, TArray< void * > &OutArchetypeInstContainers)
 
EPropertyAccessResultFlags PropertyAccessUtil::SetPropertyValue_Object (const FProperty *InObjectProp, UObject *InObject, const FProperty *InSrcProp, const void *InSrcValue, const int32 InArrayIndex, const uint64 InReadOnlyFlags, const EPropertyAccessChangeNotifyMode InNotifyMode)
 
EPropertyAccessResultFlags PropertyAccessUtil::SetPropertyValue_InContainer (const FProperty *InContainerProp, void *InContainerData, const TArray< void * > &InArchetypeInstContainerData, const FProperty *InSrcProp, const void *InSrcValue, const int32 InArrayIndex, const uint64 InReadOnlyFlags, const bool InOwnerIsTemplate, const FPropertyAccessBuildChangeNotifyFunc &InBuildChangeNotifyFunc)
 
EPropertyAccessResultFlags PropertyAccessUtil::SetPropertyValue_DirectSingle (const FProperty *InSrcProp, const void *InSrcValue, const FProperty *InDestProp, void *InDestValue, const TArray< void * > &InArchetypeInstDestValues, const uint64 InReadOnlyFlags, const bool InOwnerIsTemplate, const FPropertyAccessBuildChangeNotifyFunc &InBuildChangeNotifyFunc)
 
EPropertyAccessResultFlags PropertyAccessUtil::SetPropertyValue_DirectComplete (const FProperty *InSrcProp, const void *InSrcValue, const FProperty *InDestProp, void *InDestValue, const TArray< void * > &InArchetypeInstDestValues, const uint64 InReadOnlyFlags, const bool InOwnerIsTemplate, const FPropertyAccessBuildChangeNotifyFunc &InBuildChangeNotifyFunc)
 
EPropertyAccessResultFlags PropertyAccessUtil::SetPropertyValue (const FPropertyAccessSetFunc &InSetFunc, const FPropertyAccessBuildChangeNotifyFunc &InBuildChangeNotifyFunc)
 
EPropertyAccessResultFlags PropertyAccessUtil::CanSetPropertyValue (const FProperty *InProp, const uint64 InReadOnlyFlags, const bool InOwnerIsTemplate)
 
void PropertyAccessUtil::EmitPreChangeNotify (const FPropertyAccessChangeNotify *InChangeNotify, const bool InIdenticalValue)
 
void PropertyAccessUtil::EmitPostChangeNotify (const FPropertyAccessChangeNotify *InChangeNotify, const bool InIdenticalValue)
 
TUniquePtr< FPropertyAccessChangeNotifyPropertyAccessUtil::BuildBasicChangeNotify (const FProperty *InProp, const UObject *InObject, const EPropertyAccessChangeNotifyMode InNotifyMode, const EPropertyChangeType::Type ChangeType)
 
bool PropertyAccessUtil::IsObjectTemplate (const UObject *InObject)
 
FPropertyPropertyAccessUtil::FindPropertyByName (const FName InPropName, const UStruct *InStruct)
 
bool PropertyAccessUtil::ImportDefaultPropertyValue (const FProperty *InProp, void *InPropValue, const FString &InDefaultValue, FOutputDevice *ErrorText)
 
bool PropertyAccessUtil::ArePropertiesCompatible (const FProperty *InSrcProp, const FProperty *InDestProp)
 
bool PropertyAccessUtil::IsSinglePropertyIdentical (const FProperty *InSrcProp, const void *InSrcValue, const FProperty *InDestProp, const void *InDestValue)
 
bool PropertyAccessUtil::IsCompletePropertyIdentical (const FProperty *InSrcProp, const void *InSrcValue, const FProperty *InDestProp, const void *InDestValue)
 
bool PropertyAccessUtil::CopySinglePropertyValue (const FProperty *InSrcProp, const void *InSrcValue, const FProperty *InDestProp, void *InDestValue)
 
bool PropertyAccessUtil::CopyCompletePropertyValue (const FProperty *InSrcProp, const void *InSrcValue, const FProperty *InDestProp, void *InDestValue)
 

Typedef Documentation

◆ FPropertyAccessBuildChangeNotifyFunc

Callback used to build the information needed to emit property change notifications when setting a property value.

◆ FPropertyAccessGetFunc

Callback used to get the value of a property.

◆ FPropertyAccessSetFunc

Callback used to set the value of a property.

Enumeration Type Documentation

◆ EPropertyAccessChangeNotifyMode

Enum controlling when to emit property change notifications when setting a property value.

Enumerator
Default 

Notify only when a value change has actually occurred

Never 

Never notify that a value change has occurred

Always 

Always notify that a value change has occurred, even if the value is unchanged

◆ EPropertyAccessResultFlags

Result flags from property access.

Enumerator
Success 

The property was accessed successfully

PermissionDenied 

The property could not be accessed due to a permission error (the permission flags can give more detail of the error)

ConversionFailed 

The property could not be read or written due to a failure converting from the source or to the destination

AccessProtected 

Permission flag added when the property cannot be accessed due to being protected (is not marked for editor or Blueprint access)

CannotEditTemplate 

Permission flag added when attempting to edit a property on a template that cannot be edited on templates

CannotEditInstance 

Permission flag added when attempting to edit a property on an instance that cannot be edited on instances

ReadOnly 

Permission flag added when attempting to edit a property that is read-only (based on the given read-only flags)

Function Documentation

◆ ENUM_CLASS_FLAGS()

ENUM_CLASS_FLAGS ( EPropertyAccessResultFlags  )