FComponentReference

Struct that allows for different ways to reference a component.

Choose your operating system:

Windows

macOS

Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/EngineTypes.h

Include

#include "Engine/EngineTypes.h"

Syntax

struct FComponentReference

Remarks

Struct that allows for different ways to reference a component. If just an Actor is specified, will return RootComponent of that Actor.

Variables

Name Description

Public variable

FName

 

ComponentProperty

Name of component to use. If this is not specified the reference refers to the root component.

Public variable

TObjectPtr< AAc...

 

OtherActor

Pointer to a different Actor that owns the Component.

Public variable

TWeakObjectPtr<...

 

OverrideComponent

Allows direct setting of first component to constraint.

Public variable

FString

 

PathToComponent

Path to the component from its owner actor

Constructors

Name Description

Public function

FComponentReference()

Functions

Name Description

Public function Const

UActorCompon...

 

GetComponent

(
    AActor* OwningActor
)

Get the actual component pointer from this reference

Operators

Name Description

Public function Const

bool

 

operator==

(
    const FComponentReference& Other
)