FRCFieldPathInfo

Holds a path from a [UObject](API\Runtime\CoreUObject\UObject\UObject) to a field.

Windows
MacOS
Linux

References

Module

RemoteControl

Header

/Engine/Plugins/VirtualProduction/RemoteControl/Source/RemoteControl/Public/RemoteControlFieldPath.h

Include

#include "RemoteControlFieldPath.h"

Syntax

[USTRUCT](Programming/UnrealArchitecture/Reference/Structs)()
struct FRCFieldPathInfo

Remarks

Holds a path from a UObject to a field. Has facilities to resolve for a given owner.

Example Usage Create a path to relative location's x value, then resolve it on an static mesh component. FRCFieldPathInfo Path("RelativeLocation.X")); bool bResolved = Path.Resolve(MyStaticMeshComponent); if (bResolved) { FRCFieldResolvedData Data = Path.GetResolvedData(); Data.ContainerAddress corresponds to &MyStaticMeshComponent.RelativeLocation Data.Field corresponds to FFloatProperty (X) Data.Struct corresponds to FVector }

Other example paths: "MyStructProperty.NestedArrayProperty[3]" "RelativeLocation" "RelativeLocation.X"

Supports array/set/map indexing. @note Only String keys are currently supported for map key indexing. ie. MyStructProperty.MyStringToVectorMap["MyKey"].X Be aware that MyStringToVectorMap[2] will not correspond to the key 2 in the map, but to the index 2 of the map. This behaviour is intended to match PropertyHandle's GeneratePathToProperty method.

Variables

Name Description

Public variable UProperty

uint32

 

PathHash

Hash created from the string we were built from to quickly compare to paths

Public variable UProperty

TArray< FRCFiel...

 

Segments

List of segments to point to a given field

Constructors

Name Description

Public function

FRCFieldPathInfo()

Public function

FRCFieldPathInfo

(
    FProperty* Property
)

Builds a path info from a property.

Public function

FRCFieldPathInfo

(
    const FString& PathInfo,
    bool bSkipDuplicates
)

Builds a path info from a string of format with '.' delimiters Optionally can reduce duplicates when dealing with containers If true -> Struct.ArrayName.ArrayName[2].Member will collapse to Struct.ArrayName[2].Member This is when being used with PathToProperty

Functions

Name Description

Public function Const

FName

 

GetFieldName()

Returns last segment's name

Public function Const

const FRCFie...

 

GetFieldSegment

(
    int32 Index
)

Gets a segment from this path

Public function Const

FRCFieldReso...

 

GetResolvedData()

Returns the resolved data of the last segment If last segment is not resolved, data won't be valid

Public function Const

int32

 

GetSegmentCount()

Returns the number of segment in this path

Public function Const

bool

 

IsEqual

(
    FStringView OtherPath
)

Returns true if the hash of the string corresponds to the string we were built with

Public function Const

bool

 

IsEqual

(
    const FRCFieldPathInfo& OtherPath
)

Returns true if hash of both PathInfo matches

Public function Const

bool

 

IsResolved()

Returns true if last segment was resolved

Public function

bool

 

Resolve

(
    UObject* Owner
)

Go through each segment and finds the property associated + container address for a given UObject owner

Public function Const

void

 

ToEditPropertyChain

(
    FEditPropertyChain& OutPropertyCha...
)

Builds an EditPropertyChain from the segments

Public function Const

FString

 

ToPathPropertyString

(
    int32 EndSegment
)

Converts this PathInfo to a string of PathToProperty format Struct.ArrayName.ArrayName[Index] If EndSegment is not none, will stop at the desired segment

Public function Const

FPropertyCha...

 

ToPropertyChangedEvent

(
    EPropertyChangeType::Type InChangeT...
)

Builds a property change event from all the segments

Public function Const

FString

 

ToString

(
    int32 EndSegment
)

Converts this PathInfo to a string Walks the full path by default If EndSegment is not none, will stop at the desired segment

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss