Navigation
API > API/Runtime > API/Runtime/Engine
Handle to a unique object. This may specify a full weigh actor or it may only specify the actor instance that represents the same object.
The handle has game thread constraints related to UObjects and should be used carefully from other threads. Can only be used on the game thread
- all constructors
- all getters (GetXYZ, FetchActor, IsActorValid, DoesRepresent) *
- comparison operators against live AActor pointer
Can be used on any thread
- MakeActorHandleToResolve to create a handle that will be lazily resolved on the game thread since it only stores a weak object ptr without any access to the live object
- handle validity and comparison operators against another handle (i.e. IsValid(), operator==|!=(const FActorInstanceHandle& Other))
| Name | FActorInstanceHandle |
| Type | struct |
| Header File | /Engine/Source/Runtime/Engine/Classes/Engine/ActorInstanceHandle.h |
| Include Path | #include "Engine/ActorInstanceHandle.h" |
Syntax
USTRUCT (BlueprintType )
struct FActorInstanceHandle
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FActorInstanceHandle
(
const UPrimitiveComponent* RelevantComponent, |
Engine/ActorInstanceHandle.h | ||
FActorInstanceHandle
(
const FActorInstanceHandle& Other |
Engine/ActorInstanceHandle.h | ||
FActorInstanceHandle
(
AActor* InActor |
Engine/ActorInstanceHandle.h | ||
| Engine/ActorInstanceHandle.h | |||
FActorInstanceHandle
(
FActorInstanceManagerInterface InManagerInterface, |
Engine/ActorInstanceHandle.h | ||
FActorInstanceHandle
(
AActor* InActor, |
Engine/ActorInstanceHandle.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers | |
|---|---|---|---|---|---|
| InstanceIndex | int32 | Identifies the instance within the manager | Engine/ActorInstanceHandle.h | ||
| ManagerInterface | FActorInstanceManagerInterface | Identifies the actor instance manager to use | Engine/ActorInstanceHandle.h | ||
| ReferenceObject | TWeakObjectPtr< UObject > | Weak UObject pointer used for two purposes: | Engine/ActorInstanceHandle.h | ||
| ResolutionStatus | EResolutionStatus | Indicates if the handle is resolved, needs to be resolved (extract Actor | ManagerInterface) | Engine/ActorInstanceHandle.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool DoesRepresent() |
Engine/ActorInstanceHandle.h | ||
bool DoesRepresentClass
(
const UClass* OtherClass |
Engine/ActorInstanceHandle.h | ||
T * FetchActor () |
Engine/ActorInstanceHandle.h | ||
AActor * FetchActor () |
Returns the actor specified by this handle. This may require loading and creating the actor object. | Engine/ActorInstanceHandle.h | |
AActor * GetCachedActor() |
Engine/ActorInstanceHandle.h | ||
FName GetFName() |
Engine/ActorInstanceHandle.h | ||
int32 GetInstanceIndex() |
Returns the index used internally by the manager | Engine/ActorInstanceHandle.h | |
ULevel * GetLevel() |
Engine/ActorInstanceHandle.h | ||
FVector GetLocation() |
Engine/ActorInstanceHandle.h | ||
T * GetManager() |
Engine/ActorInstanceHandle.h | ||
FActorInstanceManagerInterface GetManagerInterface() |
Engine/ActorInstanceHandle.h | ||
AActor * GetManagingActor() |
If this handle has a valid actor, return it; otherwise return the actor responsible for managing the instances. | Engine/ActorInstanceHandle.h | |
FString GetName() |
Engine/ActorInstanceHandle.h | ||
UClass * GetRepresentedClass() |
Engine/ActorInstanceHandle.h | ||
USceneComponent * GetRootComponent() |
Returns either the actor's root component or the root component for the manager associated with the handle | Engine/ActorInstanceHandle.h | |
FRotator GetRotation() |
Engine/ActorInstanceHandle.h | ||
FTransform GetTransform() |
Engine/ActorInstanceHandle.h | ||
bool IsUnresolvedDehydratedActor() |
Engine/ActorInstanceHandle.h | ||
bool IsValid() |
Engine/ActorInstanceHandle.h | ||
void SetCachedActor
(
AActor* InActor |
Engine/ActorInstanceHandle.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FActorInstanceHandle MakeActorHandleToResolve
(
const TWeakObjectPtr< UPrimitiveComponent >& WeakComponent, |
A path dedicated to creation of handles from any threads. | Engine/ActorInstanceHandle.h | |
static FActorInstanceHandle MakeDehydratedActorHandle
(
UObject& Manager, |
A path dedicated to creation of handles while converting actor to a dehydrated representation. | Engine/ActorInstanceHandle.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
operator bool() |
Engine/ActorInstanceHandle.h | ||
bool operator!=
(
const FActorInstanceHandle& Other |
Engine/ActorInstanceHandle.h | ||
bool operator!=
(
const AActor* OtherActor |
Engine/ActorInstanceHandle.h | ||
FActorInstanceHandle & operator=
(
const FActorInstanceHandle& Other |
Engine/ActorInstanceHandle.h | ||
FActorInstanceHandle & operator=
(
FActorInstanceHandle&& Other |
Engine/ActorInstanceHandle.h | ||
FActorInstanceHandle & operator=
(
AActor* OtherActor |
Engine/ActorInstanceHandle.h | ||
bool operator==
(
const FActorInstanceHandle& Other |
Engine/ActorInstanceHandle.h | ||
bool operator==
(
const AActor* OtherActor |
Engine/ActorInstanceHandle.h |