engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数 | Public 属性 | 静态 Public 属性 | Protected 成员函数 | Protected 属性 | 友元 | 所有成员列表
AActor类 参考

Actor is the base class for an Object that can be placed or spawned in a level. 更多...

#include <Actor.h>

+ 类 AActor 继承关系图:

Public 成员函数

 AActor ()
 Default constructor for AActor
 
 AActor (const FObjectInitializer &ObjectInitializer)
 Constructor for AActor that takes an ObjectInitializer for backward compatibility
 
float ActorGetDistanceToCollision (const FVector &Point, ECollisionChannel TraceChannel, FVector &ClosestPointOnCollision, UPrimitiveComponent **OutPrimitiveComponent=nullptr) const
 returns Distance to closest Body Instance surface. 更多...
 
bool ActorHasTag (FName Tag) const
 See if this actor's Tags array contains the supplied name tag
 
bool ActorLineTraceSingle (struct FHitResult &OutHit, const FVector &Start, const FVector &End, ECollisionChannel TraceChannel, const struct FCollisionQueryParams &Params) const
 Trace a ray against the Components of this Actor and return the first blocking hit 更多...
 
FORCEINLINE const FTransform & ActorToWorld () const
 Get the local-to-world transform of the RootComponent. 更多...
 
UActorComponent * AddComponent (FName TemplateName, bool bManualAttachment, const FTransform &RelativeTransform, const UObject *ComponentTemplateContext, bool bDeferredFinish=false)
 Creates a new component and assigns ownership to the Actor this is called for. 更多...
 
UActorComponent * AddComponentByClass (TSubclassOf< UActorComponent > Class, bool bManualAttachment, const FTransform &RelativeTransform, bool bDeferredFinish)
 Creates a new component and assigns ownership to the Actor this is called for. 更多...
 
void AddControllingMatineeActor (AMatineeActor &InMatineeActor)
 Adds a controlling matinee actor for use during matinee playback 更多...
 
void AddInstanceComponent (UActorComponent *Component)
 Adds a component to the instance components array
 
void AddOwnedComponent (UActorComponent *Component)
 Puts a component in to the OwnedComponents array of the Actor. 更多...
 
virtual void AddTickPrerequisiteActor (AActor *PrerequisiteActor)
 Make this actor tick after PrerequisiteActor. 更多...
 
virtual void AddTickPrerequisiteComponent (UActorComponent *PrerequisiteComponent)
 Make this actor tick after PrerequisiteComponent. 更多...
 
FORCEINLINE bool AllowReceiveTickEventOnDedicatedServer () const
 Return the value of bAllowReceiveTickEventOnDedicatedServer, indicating whether the Blueprint ReceiveTick() event will occur on dedicated servers.
 
virtual void ApplyWorldOffset (const FVector &InOffset, bool bWorldShift)
 Called by owning level to shift an actor location and all relevant data structures by specified delta 更多...
 
void AttachToActor (AActor *ParentActor, const FAttachmentTransformRules &AttachmentRules, FName SocketName=NAME_None)
 Attaches the RootComponent of this Actor to the RootComponent of the supplied actor, optionally at a named socket. 更多...
 
void AttachToComponent (USceneComponent *Parent, const FAttachmentTransformRules &AttachmentRules, FName SocketName=NAME_None)
 Attaches the RootComponent of this Actor to the supplied component, optionally at a named socket. 更多...
 
virtual void BecomeViewTarget (class APlayerController *PC)
 Called when this actor becomes the given PlayerController's ViewTarget. 更多...
 
virtual void BeginDestroy () override
 Called before destroying the object. 更多...
 
virtual void CalcCamera (float DeltaTime, struct FMinimalViewInfo &OutResult)
 Calculate camera view point, when viewing this actor. 更多...
 
virtual FBox CalculateComponentsBoundingBoxInLocalSpace (bool bNonColliding=false, bool bIncludeFromChildActors=false) const
 Calculates the actor space bounding box of all components in this Actor. 更多...
 
void CallPreReplication (UNetDriver *NetDriver)
 Called by the networking system to call PreReplication on this actor and its components using the given NetDriver to find or create RepChangedPropertyTrackers.
 
virtual bool CallRemoteFunction (UFunction *Function, void *Parameters, FOutParmRec *OutParms, FFrame *Stack) override
 Call the actor's function remotely 更多...
 
virtual bool CanBeBaseForCharacter (class APawn *Pawn) const
 Return true if the given Pawn can be "based" on this actor (ie walk on it). 更多...
 
bool CanBeDamaged () const
 Gets the literal value of bCanBeDamaged. 更多...
 
virtual bool CanBeInCluster () const override
 Called during cluster construction if the object can be added to a cluster 更多...
 
FORCEINLINE bool CanEverTick () const
 Accessor for the value of bCanEverTick
 
void CheckComponentInstanceName (const FName InName)
 Checks for and resolve any name conflicts prior to instancing a new Blueprint Component.
 
virtual bool CheckDefaultSubobjectsInternal () const override
 Checks default sub-object assumptions. 更多...
 
virtual bool CheckStillInWorld ()
 This will check to see if the Actor is still in the world. 更多...
 
void ClearComponentOverlaps ()
 Dispatch all EndOverlap for all of the Actor's PrimitiveComponents. 更多...
 
virtual void ClearCrossLevelReferences ()
 Do anything needed to clear out cross level references; Called from ULevel::PreSave

 
void ClearInstanceComponents (bool bDestroyComponents)
 Clears the instance components array
 
void CopyRemoteRoleFrom (const AActor *CopyFromActor)
 Copies RemoteRole from another Actor and adds this actor to the list of network actors if necessary.
 
UActorComponent * CreateComponentFromTemplate (UActorComponent *Template, const FName InName=NAME_None)
 Util to create a component based on a template

 
void DebugShowComponentHierarchy (const TCHAR *Info, bool bShowPosition=true)
 Debug helper to show the component hierarchy of this actor. 更多...
 
void DebugShowOneComponentHierarchy (USceneComponent *SceneComp, int32 &NestLevel, bool bShowPosition)
 Debug helper for showing the component hierarchy of one component
 
bool Destroy (bool bNetForce=false, bool bShouldModifyLevel=true)
 Destroy this actor. 更多...
 
void DestroyConstructedComponents ()
 Destroys the constructed components.
 
virtual void Destroyed ()
 Called when this actor is explicitly being destroyed during gameplay or in the editor, not called during level streaming or gameplay ending
 
virtual bool DestroyNetworkActorHandled ()
 Called by DestroyActor(), gives actors a chance to op out of actor destruction Used by network code to have the net connection timeout/cleanup first 更多...
 
void DetachAllSceneComponents (class USceneComponent *InParentComponent, const FDetachmentTransformRules &DetachmentRules)
 Detaches all SceneComponents in this Actor from the supplied parent SceneComponent. 更多...
 
void DetachFromActor (const FDetachmentTransformRules &DetachmentRules)
 Detaches the RootComponent of this Actor from any SceneComponent it is currently attached to. 更多...
 
void DetachRootComponentFromParent (bool bMaintainWorldPosition=true)
 DEPRECATED - Use DetachFromActor() instead
 
void DisableComponentsSimulatePhysics ()
 Stop all simulation from all components in this actor
 
virtual void DisableInput (class APlayerController *PlayerController)
 Removes this actor from the stack of input being handled by a PlayerController. 更多...
 
void DispatchBeginPlay (bool bFromLevelStreaming=false)
 Initiate a begin play call on this Actor, will handle calling in the correct order.
 
void DispatchBlockingHit (UPrimitiveComponent *MyComp, UPrimitiveComponent *OtherComp, bool bSelfMoved, FHitResult const &Hit)
 Call ReceiveHit, as well as delegates on Actor and Component
 
virtual void DispatchPhysicsCollisionHit (const struct FRigidBodyCollisionInfo &MyInfo, const struct FRigidBodyCollisionInfo &OtherInfo, const FCollisionImpactData &RigidCollisionData)
 Dispatches ReceiveHit virtual and OnComponentHit delegate
 
virtual void DisplayDebug (class UCanvas *Canvas, const class FDebugDisplayInfo &DebugDisplay, float &YL, float &YPos)
 Draw important Actor variables on canvas. 更多...
 
void DrawDebugComponents (FColor const &BaseColor=FColor::White) const
 Debug rendering to visualize the component tree for this actor.
 
virtual void EnableInput (class APlayerController *PlayerController)
 Pushes this actor on to the stack of input being handled by a PlayerController. 更多...
 
virtual void EndViewTarget (class APlayerController *PC)
 Called when this actor is no longer the given PlayerController's ViewTarget. 更多...
 
void ExchangeNetRoles (bool bRemoteOwner)
 Swaps Role and RemoteRole if client
 
bool ExecuteConstruction (const FTransform &Transform, const struct FRotationConversionCache *TransformRotationCache, const class FComponentInstanceDataCache *InstanceDataCache, bool bIsDefaultTransform=false)
 Run any construction script for this Actor. 更多...
 
virtual void FellOutOfWorld (const class UDamageType &dmgType)
 Called when the actor falls out of the world 'safely' (below KillZ and such)
 
template<class T >
T * FindComponentByClass () const
 Templatized version of FindComponentByClass that handles casting for you
 
virtual UActorComponent * FindComponentByClass (const TSubclassOf< UActorComponent > ComponentClass) const
 Searches components array and returns first encountered component of the specified class, native version of GetComponentByClass
 
FNetworkObjectInfo * FindNetworkObjectInfo ()
 Find the FNetworkObjectInfo struct associated with this actor (for the main NetDriver). 更多...
 
FNetworkObjectInfo * FindOrAddNetworkObjectInfo ()
 Find the FNetworkObjectInfo struct associated with this actor (for the main NetDriver). 更多...
 
void FinishAddComponent (UActorComponent *Component, bool bManualAttachment, const FTransform &RelativeTransform)
 Completes the creation of a new actor component. 更多...
 
void FinishAndRegisterComponent (UActorComponent *Component)
 Helper function to register the specified component, and add it to the serialized components array 更多...
 
void FinishSpawning (const FTransform &Transform, bool bIsDefaultTransform=false, const FComponentInstanceDataCache *InstanceDataCache=nullptr)
 Called to finish the spawning process, generally in the case of deferred spawning
 
void FlushNetDormancy ()
 Forces dormant actor to replicate but doesn't change NetDormancy state (i.e., they will go dormant again if left dormant)
 
virtual void ForceNetRelevant ()
 Forces this actor to be net relevant if it is not already by default

 
virtual void ForceNetUpdate ()
 Force actor to be updated to clients/demo net drivers
 
void ForcePropertyCompare ()
 Forces properties on this actor to do a compare for one frame (rather than share shadow state)
 
void ForEachAttachedActors (TFunctionRef< bool(class AActor *)> Functor) const
 Call a functor for Actors which are attached directly to a component in this actor. 更多...
 
template<class ComponentType , typename Func >
void ForEachComponent (bool bIncludeFromChildActors, Func InFunc) const
 Calls the compile-time lambda on each component of the specified type 更多...
 
template<typename Func >
void ForEachComponent (bool bIncludeFromChildActors, Func InFunc) const
 Calls the compile-time lambda on each valid component 更多...
 
virtual void GatherCurrentMovement ()
 Fills ReplicatedMovement property
 
void GetActorBounds (bool bOnlyCollidingComponents, FVector &Origin, FVector &BoxExtent, bool bIncludeFromChildActors=false) const
 Returns the bounding box of all components that make up this Actor (excluding ChildActorComponents). 更多...
 
bool GetActorEnableCollision () const
 Get current state of collision for the whole actor
 
virtual void GetActorEyesViewPoint (FVector &OutLocation, FRotator &OutRotation) const
 Returns the point of view of the actor. 更多...
 
FVector GetActorForwardVector () const
 Get the forward (X) vector (length 1.0) from this Actor, in world space. 更多...
 
FORCEINLINE FVector GetActorLocation () const
 Returns the location of the RootComponent of this Actor
 
FORCEINLINE FQuat GetActorQuat () const
 Returns the quaternion of the RootComponent of this Actor
 
FVector GetActorRelativeScale3D () const
 Return the actor's relative scale 3d
 
FVector GetActorRightVector () const
 Get the right (Y) vector (length 1.0) from this Actor, in world space. 更多...
 
FORCEINLINE FRotator GetActorRotation () const
 Returns the rotation of the RootComponent of this Actor
 
FORCEINLINE FVector GetActorScale () const
 Returns the scale of the RootComponent of this Actor
 
FVector GetActorScale3D () const
 Returns the Actor's world-space scale.
 
float GetActorTickInterval () const
 Returns the tick interval of this actor's primary tick function
 
float GetActorTimeDilation () const
 Get ActorTimeDilation - this can be used for input control or speed control for slomo. 更多...
 
float GetActorTimeDilation (const UWorld &ActorWorld) const
 More efficient version that takes the Actor's current world.
 
FORCEINLINE const FTransform & GetActorTransform () const
 Returns the transform of the RootComponent of this Actor
 
FVector GetActorUpVector () const
 Get the up (Z) vector (length 1.0) from this Actor, in world space. 更多...
 
void GetAllChildActors (TArray< AActor * > &ChildActors, bool bIncludeDescendants=true) const
 Returns a list of all actors spawned by our Child Actor Components, including children of children. 更多...
 
void GetAttachedActors (TArray< AActor * > &OutActors, bool bResetArray=true) const
 Find all Actors which are attached directly to a component in this actor
 
const struct FRepAttachment & GetAttachmentReplication () const
 Get read-only access to current AttachmentReplication.
 
AActor * GetAttachParentActor () const
 Walk up the attachment chain from RootComponent until we encounter a different actor, and return it. 更多...
 
FName GetAttachParentSocketName () const
 Walk up the attachment chain from RootComponent until we encounter a different actor, and return the socket name in the component. 更多...
 
UActorComponent * GetComponentByClass (TSubclassOf< UActorComponent > ComponentClass) const
 Searches components array and returns first encountered component of the specified class
 
const TSet< UActorComponent * > & GetComponents () const
 Get a direct reference to the Components set rather than a copy with the null pointers removed. 更多...
 
template<class T , class AllocatorType >
void GetComponents (TArray< T *, AllocatorType > &OutComponents, bool bIncludeFromChildActors=false) const
 Get all components derived from class 'T' and fill in the OutComponents array with the result. 更多...
 
template<class AllocatorType >
void GetComponents (TArray< UActorComponent *, AllocatorType > &OutComponents, bool bIncludeFromChildActors=false) const
 UActorComponent specialization of GetComponents() to avoid unnecessary casts. 更多...
 
template<class AllocatorType >
void GetComponents (TSubclassOf< UActorComponent > ComponentClass, TArray< UActorComponent *, AllocatorType > &OutComponents, bool bIncludeFromChildActors=false) const
 Get all components derived from specified ComponentClass and fill in the OutComponents array with the result. 更多...
 
virtual FBox GetComponentsBoundingBox (bool bNonColliding=false, bool bIncludeFromChildActors=false) const
 Returns the world space bounding box of all components in this Actor. 更多...
 
virtual void GetComponentsBoundingCylinder (float &CollisionRadius, float &CollisionHalfHeight, bool bNonColliding=false, bool bIncludeFromChildActors=false) const
 Get half-height/radius of a big axis-aligned cylinder around this actors registered colliding components, or all registered components if bNonColliding is false. 更多...
 
TArray< UActorComponent * > GetComponentsByInterface (TSubclassOf< UInterface > Interface) const
 Gets all the components that implements the given interface.
 
TArray< UActorComponent * > GetComponentsByTag (TSubclassOf< UActorComponent > ComponentClass, FName Tag) const
 Gets all the components that inherit from the given class with a given tag.
 
virtual ECollisionResponse GetComponentsCollisionResponseToChannel (ECollisionChannel Channel) const
 Get Collision Response to the passed in Channel for all components It returns Max of state - i.e. 更多...
 
virtual USceneComponent * GetDefaultAttachComponent () const
 Returns this actor's default attachment component for attaching children to 更多...
 
float GetDistanceTo (const AActor *OtherActor) const
 Returns the distance from this Actor to OtherActor.
 
float GetDotProductTo (const AActor *OtherActor) const
 Returns the dot product from this Actor to OtherActor. 更多...
 
virtual int32 GetFunctionCallspace (UFunction *Function, FFrame *Stack) override
 Return the space this function should be called. 更多...
 
class UGameInstance * GetGameInstance () const
 Gets the GameInstance that ultimately contains this actor.
 
template<class T >
T * GetGameInstance () const
 Gets the GameInstance that ultimately contains this actor cast to the template type. 更多...
 
float GetGameTimeSinceCreation () const
 The number of seconds (in game time) since this Actor was created, relative to Get Game Time In Seconds.
 
float GetHorizontalDistanceTo (const AActor *OtherActor) const
 Returns the distance from this Actor to OtherActor, ignoring Z.
 
float GetHorizontalDotProductTo (const AActor *OtherActor) const
 Returns the dot product from this Actor to OtherActor, ignoring Z. 更多...
 
virtual FString GetHumanReadableName () const
 Returns the human readable string representation of an object.
 
float GetInputAxisKeyValue (const FKey InputAxisKey) const
 Gets the value of the input axis key if input is enabled for this actor.
 
float GetInputAxisValue (const FName InputAxisName) const
 Gets the value of the input axis if input is enabled for this actor.
 
FVector GetInputVectorAxisValue (const FKey InputAxisKey) const
 Gets the value of the input axis key if input is enabled for this actor.
 
const TArray< UActorComponent * > & GetInstanceComponents () const
 Returns the instance components array
 
APawn * GetInstigator () const
 Returns the instigator for this actor, or nullptr if there is none.
 
template<class T >
T * GetInstigator () const
 Get the instigator, cast as a specific class. 更多...
 
AController * GetInstigatorController () const
 Returns the instigator's controller for this actor, or nullptr if there is none.
 
template<class T >
T * GetInstigatorController () const
 Returns the instigator's controller, cast as a specific class. 更多...
 
FORCEINLINE bool GetIsReplicated () const
 Returns whether replication is enabled or not.
 
virtual float GetLastRenderTime () const
 Returns the most recent time any of this actor's components were rendered
 
ULevel * GetLevel () const
 Return the ULevel that this Actor is part of.
 
virtual float GetLifeSpan () const
 Get the remaining lifespan of this actor. 更多...
 
void GetLifetimeReplicatedProps (TArray< FLifetimeProperty > &OutLifetimeProps) const override
 Returns the properties used for network replication, this needs to be overridden by all actor classes with native replicated properties
 
ENetRole GetLocalRole () const
 Returns how much control the local machine has over this actor.
 
virtual class UNetConnection * GetNetConnection () const
 Get the owning connection used for communicating between client/server 更多...
 
virtual bool GetNetDormancy (const FVector &ViewPos, const FVector &ViewDir, class AActor *Viewer, AActor *ViewTarget, UActorChannel *InChannel, float Time, bool bLowBandwidth)
 Returns true if the actor should be dormant for a specific net connection. 更多...
 
class UNetDriver * GetNetDriver () const
 Returns the net driver that this actor is bound to, may be null
 
FName GetNetDriverName () const
 Returns name of the net driver associated with this actor (all RPCs will go out via this connection)
 
ENetMode GetNetMode () const
 Get the network mode (dedicated server, client, standalone, etc) for this actor. 更多...
 
virtual const AActor * GetNetOwner () const
 Return the actor responsible for replication, if any. 更多...
 
virtual class UPlayer * GetNetOwningPlayer ()
 Return the owning UPlayer (if any) of this actor. 更多...
 
virtual float GetNetPriority (const FVector &ViewPos, const FVector &ViewDir, class AActor *Viewer, AActor *ViewTarget, UActorChannel *InChannel, float Time, bool bLowBandwidth)
 Function used to prioritize actors when deciding which to replicate 更多...
 
void GetOverlappingActors (TArray< AActor * > &OverlappingActors, TSubclassOf< AActor > ClassFilter=nullptr) const
 Returns list of actors this actor is overlapping (any component overlapping any component). 更多...
 
void GetOverlappingActors (TSet< AActor * > &OverlappingActors, TSubclassOf< AActor > ClassFilter=nullptr) const
 Returns set of actors this actor is overlapping (any component overlapping any component). 更多...
 
void GetOverlappingComponents (TArray< UPrimitiveComponent * > &OverlappingComponents) const
 Returns list of components this actor is overlapping.
 
void GetOverlappingComponents (TSet< UPrimitiveComponent * > &OverlappingComponents) const
 Returns set of components this actor is overlapping.
 
AActor * GetOwner () const
 Get the owner of this Actor, used primarily for network replication.
 
template<class T >
T * GetOwner () const
 Templated version of GetOwner(), will return nullptr if cast fails
 
AActor * GetParentActor () const
 If this Actor was created by a Child Actor Component returns the Actor that owns that Child Actor Component

 
UChildActorComponent * GetParentComponent () const
 If this Actor was created by a Child Actor Component returns that Child Actor Component

 
FVector GetPlacementExtent () const
 Get the extent used when placing this actor in the editor, used for 'pulling back' hit.
 
ENetRole GetRemoteRole () const
 Returns how much control the remote machine has over this actor.
 
virtual float GetReplayPriority (const FVector &ViewPos, const FVector &ViewDir, class AActor *Viewer, AActor *ViewTarget, UActorChannel *const InChannel, float Time)
 Similar to GetNetPriority, but will only be used for prioritizing actors while recording a replay. 更多...
 
const TArray< UActorComponent * > & GetReplicatedComponents () const
 Returns a constant reference to the replicated components set
 
const FRepMovement & GetReplicatedMovement () const
 Gets the literal value of ReplicatedMovement. 更多...
 
FRepMovement & GetReplicatedMovement_Mutable ()
 Gets a reference to ReplicatedMovement with the expectation that it will be modified. 更多...
 
FORCEINLINE USceneComponent * GetRootComponent () const
 Returns this actor's root component.
 
virtual void GetSimpleCollisionCylinder (float &CollisionRadius, float &CollisionHalfHeight) const
 Get axis-aligned cylinder around this actor, used for simple collision checks (ie Pawns reaching a destination). 更多...
 
FVector GetSimpleCollisionCylinderExtent () const
 Returns collision extents vector for this Actor, based on GetSimpleCollisionCylinder().
 
float GetSimpleCollisionHalfHeight () const
 Returns the half height of the collision cylinder from GetSimpleCollisionCylinder().
 
float GetSimpleCollisionRadius () const
 Returns the radius of the collision cylinder from GetSimpleCollisionCylinder().
 
float GetSquaredDistanceTo (const AActor *OtherActor) const
 Returns the squared distance from this Actor to OtherActor.
 
virtual void GetSubobjectsWithStableNamesForNetworking (TArray< UObject * > &ObjList) override
 Returns a list of sub-objects that have stable names for networking
 
virtual FVector GetTargetLocation (AActor *RequestedBy=nullptr) const
 Returns the optimal location to fire weapons at this actor 更多...
 
bool GetTearOff () const
 If true, this actor is no longer replicated to new clients, and is "torn off" (becomes a ROLE_Authority) on clients to which it was being replicated.
 
bool GetTickableWhenPaused ()
 Gets whether this actor can tick when paused.
 
const FTransform & GetTransform () const
 Get the actor-to-world transform. 更多...
 
EActorUpdateOverlapsMethod GetUpdateOverlapsMethodDuringLevelStreaming () const
 Get the method used to UpdateOverlaps() when loaded via level streaming. 更多...
 
virtual FVector GetVelocity () const
 Returns velocity (in cm/s (Unreal Units/second) of the rootcomponent if it is either using physics or has an associated MovementComponent
 
float GetVerticalDistanceTo (const AActor *OtherActor) const
 Returns the distance from this Actor to OtherActor, ignoring XY.
 
virtual UWorld * GetWorld () const override
 Getter for the cached world pointer, will return null if the actor is not actually spawned in a level
 
class AWorldSettings * GetWorldSettings () const
 Returns the WorldSettings for the World the actor is in If you'd like to know what UWorld this placed actor (not dynamic spawned actor) belong to, use GetTypedOuter<UWorld>()
 
class FTimerManager & GetWorldTimerManager () const
 Get the timer instance from the actors world
 
virtual bool HasActiveCameraComponent () const
 Returns true if the actor contains an active camera component
 
virtual bool HasActivePawnControlCameraComponent () const
 Returns true if the actor contains an active locked to HMD camera component
 
bool HasActorBegunPlay () const
 Returns whether an actor has had BeginPlay called on it (and not subsequently had EndPlay called)
 
bool HasAuthority () const
 Returns whether this actor has network authority
 
FORCEINLINE bool HasDeferredComponentRegistration () const
 Returns true if Actor has deferred the RegisterAllComponents() call at spawn time (e.g. 更多...
 
virtual bool HasLocalNetOwner () const
 Does this actor have a locally controlled owner responsible for replication? (APlayerController typically) 更多...
 
virtual bool HasNetOwner () const
 Does this actor have an owner responsible for replication? (APlayerController typically) 更多...
 
bool HasValidRootComponent ()
 Returns true if Actor has a registered root component
 
bool IncrementalRegisterComponents (int32 NumComponentsToRegister, FRegisterComponentContext *Context=nullptr)
 Incrementally registers components associated with this actor, used during level streaming 更多...
 
void InitializeComponents ()
 Iterate over components array and call InitializeComponent, which happens once per actor
 
void InvalidateLightingCache ()
 Invalidate lighting cache with default options.
 
virtual void InvalidateLightingCacheDetailed (bool bTranslationOnly)
 Invalidates anything produced by the last lighting build.
 
bool IsActorBeginningPlay () const
 Returns whether an actor is in the process of beginning play
 
bool IsActorBeginningPlayFromLevelStreaming () const
 Returns whether an actor is beginning play in DispatchBeginPlay() during level streaming (which includes initial level load).
 
bool IsActorBeingDestroyed () const
 Returns true if this actor is currently being destroyed, some gameplay events may be unsafe
 
bool IsActorInitialized () const
 Returns whether an actor has been initialized for gameplay
 
bool IsActorTickEnabled () const
 Returns whether this actor has tick enabled or not

 
virtual bool IsAsset () const override
 Returns true if this object is considered an asset.
 
virtual bool IsAttachedTo (const AActor *Other) const
 Iterates up the attachment chain to see whether or not this Actor is attached to the given Actor 更多...
 
virtual bool IsBasedOnActor (const AActor *Other) const
 Iterates up the movement base chain to see whether or not this Actor is based on the given Actor, defaults to checking attachment 更多...
 
bool IsChildActor () const
 Returns whether this Actor was spawned by a child actor component
 
virtual bool IsComponentRelevantForNavigation (UActorComponent *Component) const
 Check if owned component should be relevant for navigation Allows implementing master switch to disable e.g. 更多...
 
virtual bool IsEditorOnly () const override
 Called during saving to determine if the object is forced to be editor only or not 更多...
 
bool IsHidden () const
 Gets the literal value of bHidden. 更多...
 
bool IsInLevel (const class ULevel *TestLevel) const
 Returns true if this actor is contained by TestLevel.
 
bool IsInPersistentLevel (bool bIncludeLevelStreamingPersistent=false) const
 Returns whether this Actor is in the persistent level, i.e. 更多...
 
virtual bool IsLevelBoundsRelevant () const
 Indicates whether this actor should participate in level bounds calculations
 
bool IsMatineeControlled () const
 Returns whether a MatineeActor is currently controlling this Actor
 
virtual bool IsNameStableForNetworking () const override
 IsNameStableForNetworking means an object can be referred to its path name (relative to outer) over the network
 
bool IsNetMode (ENetMode Mode) const
 Test whether net mode is the given mode. 更多...
 
virtual bool IsNetRelevantFor (const AActor *RealViewer, const AActor *ViewTarget, const FVector &SrcLocation) const
 Checks to see if this actor is relevant for a specific network connection 更多...
 
bool IsNetStartupActor () const
 Returns true if this is a replicated actor that was placed in the map
 
bool IsOverlappingActor (const AActor *Other) const
 Check whether any component of this Actor is overlapping any component of another Actor. 更多...
 
bool IsOwnedBy (const AActor *TestOwner) const
 See if this actor is owned by TestOwner.
 
bool IsPackageExternal () const
 Get the actor packaging mode. 更多...
 
bool IsPendingKillPending () const
 Returns true if this actor has begun the destruction process. 更多...
 
virtual bool IsReadyForFinishDestroy () override
 Called to check if the object is ready for FinishDestroy. 更多...
 
virtual bool IsRelevancyOwnerFor (const AActor *ReplicatedActor, const AActor *ActorOwner, const AActor *ConnectionActor) const
 Check if this actor is the owner when doing relevancy checks for actors marked bOnlyRelevantToOwner 更多...
 
virtual bool IsReplayRelevantFor (const AActor *RealViewer, const AActor *ViewTarget, const FVector &SrcLocation, const float CullDistanceSquared) const
 Checks to see if this actor is relevant for a recorded replay 更多...
 
bool IsReplicatingMovement () const
 Gets the literal value of bReplicateMovement. 更多...
 
virtual bool IsReplicationPausedForConnection (const FNetViewer &ConnectionOwnerNetViewer)
 Gives the actor a chance to pause replication to a player represented by the passed in actor - only called on server
 
virtual bool IsRootComponentCollisionRegistered () const
 Returns true if the root component is registered and has collision enabled. 更多...
 
bool IsRootComponentMovable () const
 See if the root component has Mobility of EComponentMobility::Movable
 
bool IsRootComponentStatic () const
 See if the root component has ModifyFrequency of MF_Static
 
bool IsRootComponentStationary () const
 See if the root component has Mobility of EComponentMobility::Stationary
 
FORCEINLINE bool IsRunningUserConstructionScript () const
 Returns if this actor is currently running the User Construction Script
 
virtual bool IsSupportedForNetworking () const override
 IsSupportedForNetworking means an object can be referenced over the network
 
void K2_AddActorLocalOffset (FVector DeltaLocation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the location of this component in its local reference frame. 更多...
 
void K2_AddActorLocalRotation (FRotator DeltaRotation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the rotation of this component in its local reference frame 更多...
 
void K2_AddActorLocalTransform (const FTransform &NewTransform, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the transform of this component in its local reference frame 更多...
 
void K2_AddActorWorldOffset (FVector DeltaLocation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the location of this actor in world space. 更多...
 
void K2_AddActorWorldRotation (FRotator DeltaRotation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the rotation of this actor in world space. 更多...
 
void K2_AddActorWorldTransform (const FTransform &DeltaTransform, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the transform of this actor in world space. 更多...
 
void K2_AddActorWorldTransformKeepScale (const FTransform &DeltaTransform, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the transform of this actor in world space. 更多...
 
void K2_AttachRootComponentTo (USceneComponent *InParent, FName InSocketName=NAME_None, EAttachLocation::Type AttachLocationType=EAttachLocation::KeepRelativeOffset, bool bWeldSimulatedBodies=true)
 DEPRECATED - Use AttachToComponent() instead
 
void K2_AttachRootComponentToActor (AActor *InParentActor, FName InSocketName=NAME_None, EAttachLocation::Type AttachLocationType=EAttachLocation::KeepRelativeOffset, bool bWeldSimulatedBodies=true)
 DEPRECATED - Use AttachToActor() instead
 
void K2_AttachToActor (AActor *ParentActor, FName SocketName, EAttachmentRule LocationRule, EAttachmentRule RotationRule, EAttachmentRule ScaleRule, bool bWeldSimulatedBodies)
 Attaches the RootComponent of this Actor to the supplied actor, optionally at a named socket. 更多...
 
void K2_AttachToComponent (USceneComponent *Parent, FName SocketName, EAttachmentRule LocationRule, EAttachmentRule RotationRule, EAttachmentRule ScaleRule, bool bWeldSimulatedBodies)
 Attaches the RootComponent of this Actor to the supplied component, optionally at a named socket. 更多...
 
virtual void K2_DestroyActor ()
 Destroy the actor
 
void K2_DetachFromActor (EDetachmentRule LocationRule=EDetachmentRule::KeepRelative, EDetachmentRule RotationRule=EDetachmentRule::KeepRelative, EDetachmentRule ScaleRule=EDetachmentRule::KeepRelative)
 Detaches the RootComponent of this Actor from any SceneComponent it is currently attached to. 更多...
 
FVector K2_GetActorLocation () const
 Returns the location of the RootComponent of this Actor
 
FRotator K2_GetActorRotation () const
 Returns rotation of the RootComponent of this Actor.
 
TArray< UActorComponent * > K2_GetComponentsByClass (TSubclassOf< UActorComponent > ComponentClass) const
 Gets all the components that inherit from the given class. 更多...
 
USceneComponent * K2_GetRootComponent () const
 Returns the RootComponent of this Actor
 
void K2_OnBecomeViewTarget (class APlayerController *PC)
 Event called when this Actor becomes the view target for the given PlayerController.
 
void K2_OnEndViewTarget (class APlayerController *PC)
 Event called when this Actor is no longer the view target for the given PlayerController.
 
void K2_OnReset ()
 Event called when this Actor is reset to its initial state - used when restarting level without reloading.
 
bool K2_SetActorLocation (FVector NewLocation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Move the Actor to the specified location. 更多...
 
bool K2_SetActorLocationAndRotation (FVector NewLocation, FRotator NewRotation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Move the actor instantly to the specified location and rotation. 更多...
 
void K2_SetActorRelativeLocation (FVector NewRelativeLocation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Set the actor's RootComponent to the specified relative location. 更多...
 
void K2_SetActorRelativeRotation (FRotator NewRelativeRotation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Set the actor's RootComponent to the specified relative rotation 更多...
 
void K2_SetActorRelativeTransform (const FTransform &NewRelativeTransform, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Set the actor's RootComponent to the specified relative transform 更多...
 
bool K2_SetActorRotation (FRotator NewRotation, bool bTeleportPhysics)
 Set the Actor's rotation instantly to the specified rotation. 更多...
 
bool K2_SetActorTransform (const FTransform &NewTransform, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Set the Actors transform to the specified one. 更多...
 
bool K2_TeleportTo (FVector DestLocation, FRotator DestRotation)
 Teleport this actor to a new location. 更多...
 
virtual void LifeSpanExpired ()
 Called when the lifespan of an actor expires (if he has one).
 
void MakeNoise (float Loudness=1.f, APawn *NoiseInstigator=nullptr, FVector NoiseLocation=FVector::ZeroVector, float MaxRange=0.f, FName Tag=NAME_None)
 Trigger a noise caused by a given Pawn, at a given location. 更多...
 
virtual void MarkComponentsAsPendingKill ()
 Called to mark all components as pending kill when the actor is being destroyed
 
void MarkComponentsRenderStateDirty ()
 Flags all component's render state as dirty

 
virtual void NotifyActorBeginCursorOver ()
 Event when this actor has the mouse moved over it with the clickable interface.
 
virtual void NotifyActorBeginOverlap (AActor *OtherActor)
 Event when this actor overlaps another actor, for example a player walking into a trigger. 更多...
 
virtual void NotifyActorEndCursorOver ()
 Event when this actor has the mouse moved off of it with the clickable interface.
 
virtual void NotifyActorEndOverlap (AActor *OtherActor)
 Event when an actor no longer overlaps another actor, and they have separated. 更多...
 
virtual void NotifyActorOnClicked (FKey ButtonPressed=EKeys::LeftMouseButton)
 Event when this actor is clicked by the mouse when using the clickable interface.
 
virtual void NotifyActorOnInputTouchBegin (const ETouchIndex::Type FingerIndex)
 Event when this actor is touched when click events are enabled.
 
virtual void NotifyActorOnInputTouchEnd (const ETouchIndex::Type FingerIndex)
 Event when this actor is under the finger when untouched when click events are enabled.
 
virtual void NotifyActorOnInputTouchEnter (const ETouchIndex::Type FingerIndex)
 Event when this actor has a finger moved over it with the clickable interface.
 
virtual void NotifyActorOnInputTouchLeave (const ETouchIndex::Type FingerIndex)
 Event when this actor has a finger moved off of it with the clickable interface.
 
virtual void NotifyActorOnReleased (FKey ButtonReleased=EKeys::LeftMouseButton)
 Event when this actor is under the mouse when left mouse button is released while using the clickable interface.
 
virtual void NotifyHit (class UPrimitiveComponent *MyComp, AActor *Other, class UPrimitiveComponent *OtherComp, bool bSelfMoved, FVector HitLocation, FVector HitNormal, FVector NormalImpulse, const FHitResult &Hit)
 Event when this actor bumps into a blocking object, or blocks another actor that bumps into it. 更多...
 
virtual void OnActorChannelOpen (class FInBunch &InBunch, class UNetConnection *Connection)
 Allows for a specific response from the actor when the actor channel is opened (client side) 更多...
 
virtual void OnConstruction (const FTransform &Transform)
 Called when an instance of this class is placed (in editor) or spawned. 更多...
 
virtual void OnNetCleanup (class UNetConnection *Connection)
 Handles cleaning up the associated Actor when killing the connection 更多...
 
virtual void OnRep_AttachmentReplication ()
 Called on client when updated AttachmentReplication value is received for this actor.
 
virtual void OnRep_Instigator ()
 Called on clients when Instigator is replicated.
 
virtual void OnRep_ReplicatedMovement ()
 ReplicatedMovement struct replication event
 
virtual void OnRep_ReplicateMovement ()
 Called on client when updated bReplicateMovement value is received for this actor.
 
virtual void OnReplicationPausedChanged (bool bIsReplicationPaused)
 Called on the client when the replication paused value is changed
 
virtual void OnSerializeNewActor (class FOutBunch &OutBunch)
 SerializeNewActor has just been called on the actor before network replication (server side) 更多...
 
virtual void OnSubobjectCreatedFromReplication (UObject *NewSubobject)
 Called on the actor when a new subobject is dynamically created via replication
 
virtual void OnSubobjectDestroyFromReplication (UObject *Subobject)
 Called on the actor when a subobject is dynamically destroyed via replication
 
virtual void OutsideWorldBounds ()
 Called when the Actor is outside the hard limit on world bounds
 
void PostActorConstruction ()
 Called after the actor has run its construction. 更多...
 
virtual void PostActorCreated ()
 Called when an actor is done spawning into the world (from UWorld::SpawnActor), both in the editor and during gameplay For actors with a root component, the location and rotation will have already been set. 更多...
 
virtual void PostInitializeComponents ()
 Allow actors to initialize themselves on the C++ side after all of their components have been initialized, only called during gameplay
 
virtual void PostInitProperties () override
 Called after the C++ constructor and after the properties have been initialized, including those loaded from config. 更多...
 
virtual void PostLoad () override
 Do any object-specific cleanup required immediately after loading an object. 更多...
 
virtual void PostLoadSubobjects (FObjectInstancingGraph *OuterInstanceGraph) override
 Instances components for objects being loaded from disk, if necessary. 更多...
 
virtual void PostNetInit ()
 Always called immediately after spawning and reading in replicated properties
 
virtual void PostNetReceive () override
 Always called immediately after properties are received from the remote.
 
virtual void PostNetReceiveLocationAndRotation ()
 Update location and rotation from ReplicatedMovement. 更多...
 
virtual void PostNetReceivePhysicState ()
 Update and smooth simulated physic state, replaces PostNetReceiveLocation() and PostNetReceiveVelocity()
 
virtual void PostNetReceiveRole ()
 Always called immediately after a new Role is received from the remote.
 
virtual void PostNetReceiveVelocity (const FVector &NewVelocity)
 Update velocity - typically from ReplicatedMovement, not called for simulated physics!
 
virtual void PostRegisterAllComponents ()
 Called after all the components in the Components array are registered, called both in editor and during gameplay
 
virtual void PostRename (UObject *OldOuter, const FName OldName) override
 Called at the end of Rename(), but only if the rename was actually carried out
 
virtual void PostRenderFor (class APlayerController *PC, class UCanvas *Canvas, FVector CameraPosition, FVector CameraDir)
 Hook to allow actors to render HUD overlays for themselves. 更多...
 
virtual void PostSaveRoot (bool bCleanupIsRequired) override
 Called from within SavePackage on the passed in base/root object. 更多...
 
void PostSpawnInitialize (FTransform const &SpawnTransform, AActor *InOwner, APawn *InInstigator, bool bRemoteOwned, bool bNoFail, bool bDeferConstruction)
 Called after the actor is spawned in the world. 更多...
 
virtual void PostUnregisterAllComponents ()
 Called after all currently registered components are cleared
 
virtual void PreInitializeComponents ()
 Called right before components are initialized, only called during gameplay
 
virtual void PreNetReceive () override
 Always called immediately before properties are received from the remote.
 
virtual void PreRegisterAllComponents ()
 Called before all the components in the Components array are registered, called both in editor and during gameplay
 
virtual void PreReplication (IRepChangedPropertyTracker &ChangedPropertyTracker)
 Called on the actor right before replication occurs. 更多...
 
virtual void PreReplicationForReplay (IRepChangedPropertyTracker &ChangedPropertyTracker)
 Called on the actor right before replication occurs. 更多...
 
virtual bool PreSaveRoot (const TCHAR *InFilename) override
 Called from within SavePackage on the passed in base/root object. 更多...
 
virtual void PrestreamTextures (float Seconds, bool bEnableStreaming, int32 CinematicTextureGroups=0)
 Calls PrestreamTextures() for all the actor's meshcomponents. 更多...
 
virtual void ProcessEvent (UFunction *Function, void *Parameters) override
 Called by VM to execute a UFunction with a filled in UStruct of parameters
 
void ReceiveActorBeginCursorOver ()
 Event when this actor has the mouse moved over it with the clickable interface.
 
void ReceiveActorBeginOverlap (AActor *OtherActor)
 Event when this actor overlaps another actor, for example a player walking into a trigger. 更多...
 
void ReceiveActorEndCursorOver ()
 Event when this actor has the mouse moved off of it with the clickable interface.
 
void ReceiveActorEndOverlap (AActor *OtherActor)
 Event when an actor no longer overlaps another actor, and they have separated. 更多...
 
void ReceiveActorOnClicked (FKey ButtonPressed=EKeys::LeftMouseButton)
 Event when this actor is clicked by the mouse when using the clickable interface.
 
void ReceiveActorOnInputTouchBegin (const ETouchIndex::Type FingerIndex)
 Event when this actor is touched when click events are enabled.
 
void ReceiveActorOnInputTouchEnd (const ETouchIndex::Type FingerIndex)
 Event when this actor is under the finger when untouched when click events are enabled.
 
void ReceiveActorOnInputTouchEnter (const ETouchIndex::Type FingerIndex)
 Event when this actor has a finger moved over it with the clickable interface.
 
void ReceiveActorOnInputTouchLeave (const ETouchIndex::Type FingerIndex)
 Event when this actor has a finger moved off of it with the clickable interface.
 
void ReceiveActorOnReleased (FKey ButtonReleased=EKeys::LeftMouseButton)
 Event when this actor is under the mouse when left mouse button is released while using the clickable interface.
 
void ReceiveAnyDamage (float Damage, const class UDamageType *DamageType, class AController *InstigatedBy, AActor *DamageCauser)
 Event when this actor takes ANY damage
 
void ReceiveDestroyed ()
 Called when the actor has been explicitly destroyed.
 
void ReceiveHit (class UPrimitiveComponent *MyComp, AActor *Other, class UPrimitiveComponent *OtherComp, bool bSelfMoved, FVector HitLocation, FVector HitNormal, FVector NormalImpulse, const FHitResult &Hit)
 Event when this actor bumps into a blocking object, or blocks another actor that bumps into it. 更多...
 
void ReceivePointDamage (float Damage, const class UDamageType *DamageType, FVector HitLocation, FVector HitNormal, class UPrimitiveComponent *HitComponent, FName BoneName, FVector ShotFromDirection, class AController *InstigatedBy, AActor *DamageCauser, const FHitResult &HitInfo)
 Event when this actor takes POINT damage
 
void ReceiveRadialDamage (float DamageReceived, const class UDamageType *DamageType, FVector Origin, const struct FHitResult &HitInfo, class AController *InstigatedBy, AActor *DamageCauser)
 Event when this actor takes RADIAL damage
 
void ReceiveTick (float DeltaSeconds)
 Event called every frame, if ticking is enabled
 
void RegisterAllActorTickFunctions (bool bRegister, bool bDoComponents)
 When called, will call the virtual call chain to register all of the tick functions for both the actor and optionally all components Do not override this function or make it virtual 更多...
 
virtual void RegisterAllComponents ()
 Ensure that all the components in the Components array are registered
 
void RemoveControllingMatineeActor (AMatineeActor &InMatineeActor)
 Removes a controlling matinee actor 更多...
 
void RemoveInstanceComponent (UActorComponent *Component)
 Removes a component from the instance components array
 
void RemoveOwnedComponent (UActorComponent *Component)
 Removes a component from the OwnedComponents array of the Actor. 更多...
 
virtual void RemoveTickPrerequisiteActor (AActor *PrerequisiteActor)
 Remove tick dependency on PrerequisiteActor.
 
virtual void RemoveTickPrerequisiteComponent (UActorComponent *PrerequisiteComponent)
 Remove tick dependency on PrerequisiteComponent.
 
virtual bool Rename (const TCHAR *NewName=nullptr, UObject *NewOuter=nullptr, ERenameFlags Flags=REN_None) override
 Rename this object to a unique name, or change its outer. 更多...
 
virtual bool ReplicateSubobjects (class UActorChannel *Channel, class FOutBunch *Bunch, FReplicationFlags *RepFlags)
 Method that allows an actor to replicate subobjects on its actor channel
 
virtual void ReregisterAllComponents ()
 Will reregister all components on this actor. 更多...
 
virtual void RerunConstructionScripts ()
 Rerun construction scripts, destroying all autogenerated components; will attempt to preserve the root component location.
 
virtual void Reset ()
 Reset actor to initial state - used when restarting level without reloading.
 
void ResetOwnedComponents ()
 Force the Actor to clear and rebuild its OwnedComponents array by evaluating all children (recursively) and locating components In general this should not need to be called directly, but can sometimes be necessary as part of undo/redo code paths.
 
void ResetPropertiesForConstruction ()
 Reset private properties to defaults, and all FRandomStream structs in this Actor, so they will start their sequence of random numbers again.
 
virtual void RewindForReplay ()
 Called on the actor before checkpoint data is applied during a replay. 更多...
 
void RouteEndPlay (const EEndPlayReason::Type EndPlayReason)
 Non-virtual function to evaluate which portions of the EndPlay process should be dispatched for each actor
 
virtual void Serialize (FArchive &Ar) override
 Handles reading, writing, and reference collecting using FArchive. 更多...
 
void SetActorEnableCollision (bool bNewActorEnableCollision)
 Allows enabling/disabling collision for the whole actor
 
virtual void SetActorHiddenInGame (bool bNewHidden)
 Sets the actor to be hidden in the game 更多...
 
bool SetActorLocation (const FVector &NewLocation, bool bSweep=false, FHitResult *OutSweepHitResult=nullptr, ETeleportType Teleport=ETeleportType::None)
 Move the actor instantly to the specified location. 更多...
 
bool SetActorLocationAndRotation (FVector NewLocation, FRotator NewRotation, bool bSweep=false, FHitResult *OutSweepHitResult=nullptr, ETeleportType Teleport=ETeleportType::None)
 Move the actor instantly to the specified location and rotation. 更多...
 
void SetActorRelativeScale3D (FVector NewRelativeScale)
 Set the actor's RootComponent to the specified relative scale 3d 更多...
 
bool SetActorRotation (FRotator NewRotation, ETeleportType Teleport=ETeleportType::None)
 Set the Actor's rotation instantly to the specified rotation. 更多...
 
void SetActorScale3D (FVector NewScale3D)
 Set the Actor's world-space scale.
 
void SetActorTickEnabled (bool bEnabled)
 Set this actor's tick functions to be enabled or disabled. 更多...
 
void SetActorTickInterval (float TickInterval)
 Sets the tick interval of this actor's primary tick function. 更多...
 
void SetAutonomousProxy (const bool bInAutonomousProxy, const bool bAllowForcePropertyCompare=true)
 Sets whether or not this Actor is an autonomous proxy, which is an actor on a network client that is controlled by a user on that client.
 
void SetCanBeDamaged (bool bInCanBeDamaged)
 Sets the value of bCanBeDamaged without causing other side effects to this instance.
 
void SetHidden (const bool bInHidden)
 Sets the value of bHidden without causing other side effects to this instance. 更多...
 
void SetInstigator (APawn *InInstigator)
 Sets the value of Instigator without causing other side effects to this instance.
 
virtual void SetLifeSpan (float InLifespan)
 Set the lifespan of this actor. 更多...
 
void SetLODParent (class UPrimitiveComponent *InLODParent, float InParentDrawDistance)
 Set LOD Parent component for all of our components, normally associated with an ALODActor. 更多...
 
void SetNetDormancy (ENetDormancy NewDormancy)
 Puts actor in dormant networking state
 
void SetNetDriverName (FName NewNetDriverName)
 Set the name of the net driver associated with this actor. 更多...
 
void SetNetUpdateTime (float NewUpdateTime)
 Updates NetUpdateTime to the new value for future net relevancy checks
 
virtual void SetOwner (AActor *NewOwner)
 Set the owner of this Actor, used primarily for network replication. 更多...
 
void SetReplicatedMovement (const FRepMovement &InReplicatedMovement)
 Sets the value of ReplicatedMovement without causing other side effects to this instance.
 
virtual void SetReplicateMovement (bool bInReplicateMovement)
 Set whether this actor's movement replicates to network clients. 更多...
 
void SetReplicates (bool bInReplicates)
 Set whether this actor replicates to network clients. 更多...
 
void SetReplicatingMovement (bool bInReplicateMovement)
 Sets the value of bReplicateMovement without causing other side effects to this instance.
 
void SetRole (ENetRole InRole)
 Sets the value of Role without causing other side effects to this instance.
 
bool SetRootComponent (USceneComponent *NewRootComponent)
 Sets root component to be the specified component. 更多...
 
void SetTickableWhenPaused (bool bTickableWhenPaused)
 Sets whether this actor can tick when paused.
 
void SetTickGroup (ETickingGroup NewTickGroup)
 Sets the ticking group for this actor. 更多...
 
virtual bool ShouldTickIfViewportsOnly () const
 If true, actor is ticked even if TickType==LEVELTICK_ViewportsOnly

 
void SwapRoles ()
 Calls this to swap the Role and RemoteRole. 更多...
 
virtual float TakeDamage (float DamageAmount, struct FDamageEvent const &DamageEvent, class AController *EventInstigator, AActor *DamageCauser)
 Apply damage to this actor. 更多...
 
virtual void TearOff ()
 Networking - Server - TearOff this actor to stop replication to clients. 更多...
 
virtual void TeleportSucceeded (bool bIsATest)
 Called from TeleportTo() when teleport succeeds
 
virtual bool TeleportTo (const FVector &DestLocation, const FRotator &DestRotation, bool bIsATest=false, bool bNoCheck=false)
 Used for adding actors to levels or teleporting them to a new location. 更多...
 
virtual void Tick (float DeltaSeconds)
 Function called every frame on this Actor. 更多...
 
virtual void TickActor (float DeltaTime, enum ELevelTick TickType, FActorTickFunction &ThisTickFunction)
 Dispatches the once-per frame Tick() function for this actor 更多...
 
virtual void TornOff ()
 Networking - called on client when actor is torn off (bTearOff==true), meaning it's no longer replicated to clients. 更多...
 
void UninitializeComponents ()
 Iterate over components array and call UninitializeComponent, called when the actor is ending play
 
virtual void UnregisterAllComponents (bool bForReregister=false)
 Unregister all currently registered components 更多...
 
void UpdateAllReplicatedComponents ()
 Completely synchronizes the replicated components array so that it contains exactly the number of replicated components currently owned
 
void UpdateComponentTransforms ()
 Update all components transforms
 
void UpdateOverlaps (bool bDoNotifies=true)
 Queries world and updates overlap detection state for this actor. 更多...
 
void UpdateReplicatedComponent (UActorComponent *Component)
 Called when the replicated state of a component changes to update the Actor's cached ReplicatedComponents array
 
void UserConstructionScript ()
 Construction script, the place to spawn components and do other setup. 更多...
 
virtual bool UseShortConnectTimeout () const
 Used by the net connection to determine if a net owning actor should switch to using the shortened timeout value 更多...
 
bool WasRecentlyRendered (float Tolerance=0.2) const
 Returns true if this actor has been rendered "recently", with a tolerance in seconds to define what "recent" means. 更多...
 
- Public 成员函数 继承自 UObject
void AbortInsideMemberFunction () const
 Abort with a member function call at the top of the callstack, helping to ensure that most platforms will stuff this object's memory into the resulting minidump.
 
virtual bool AreNativePropertiesIdenticalTo (UObject *Other) const
 Returns whether native properties are identical to the one of the passed in component. 更多...
 
virtual void BeginDestroy ()
 Called before destroying the object. 更多...
 
virtual void BuildSubobjectMapping (UObject *OtherObject, TMap< UObject *, UObject * > &ObjectMapping) const
 Given OtherObject (which will be the same type as 'this'), recursively find any matching sub-objects from 'this' that also exist within OtherObject, and add the mappings to ObjectMapping. 更多...
 
void CallAddReferencedObjects (FReferenceCollector &Collector)
 Helper function to call AddReferencedObjects for this object's class. 更多...
 
void CallFunction (FFrame &Stack, RESULT_DECL, UFunction *Function)
 Internal VM method for executing a function
 
bool CallFunctionByNameWithArguments (const TCHAR *Cmd, FOutputDevice &Ar, UObject *Executor, bool bForceCallWithNonExec=false)
 Handle calling a function by name when executed from the console or a command line
 
virtual bool CallRemoteFunction (UFunction *Function, void *Parms, struct FOutParmRec *OutParms, FFrame *Stack)
 Call the actor's function remotely 更多...
 
bool CheckDefaultSubobjects (bool bForceCheck=false) const
 Checks default sub-object assumptions. 更多...
 
void CollectDefaultSubobjects (TArray< UObject * > &OutDefaultSubobjects, bool bIncludeNestedSubobjects=false) const
 Uses the TArchiveObjectReferenceCollector to build a list of all components referenced by this object which have this object as the outer 更多...
 
bool ConditionalBeginDestroy ()
 Called before destroying the object. 更多...
 
bool ConditionalFinishDestroy ()
 Called when an object is actually destroyed, memory should never be accessed again
 
void ConditionalPostLoad ()
 PostLoad if needed.
 
void ConditionalPostLoadSubobjects (struct FObjectInstancingGraph *OuterInstanceGraph=NULL)
 Instances subobjects and components for objects being loaded from disk, if necessary. 更多...
 
 DECLARE_FUNCTION (execBreakpoint)
 Breakpoint; only observed in the editor; executing it at any other time is a NOP
 
 DECLARE_FUNCTION (execInstrumentation)
 Instrumentation event for profiling; only observed in the builds with blueprint instrumentation
 
 DECLARE_FUNCTION (execPopExecutionFlow)
 Pops a code offset from the execution flow stack and starts execution there. 更多...
 
 DECLARE_FUNCTION (execPopExecutionFlowIfNot)
 Pops a code offset from the execution flow stack and starts execution there, if a condition is not true. 更多...
 
 DECLARE_FUNCTION (execPushExecutionFlow)
 Push a code offset onto the execution flow stack for future execution. 更多...
 
 DECLARE_FUNCTION (execReturnNothing)
 failsafe for functions that return a value - returns the zero value for a property and logs that control reached the end of a non-void function
 
 DECLARE_FUNCTION (execTracepoint)
 Tracepoint; only observed in the editor; executing it at any other time is a NOP
 
 DECLARE_FUNCTION (ProcessInternal)
 Internal function call processing. 更多...
 
void DestroyNonNativeProperties ()
 Destroy properties that won't be destroyed by the native destructor
 
void ExecuteUbergraph (int32 EntryPoint)
 Execute the ubergraph from a specific entry point
 
virtual void ExportCustomProperties (FOutputDevice &Out, uint32 Indent)
 Exports the property values for the specified object as text to the output device. 更多...
 
UFunction * FindFunction (FName InName) const
 Returns a UFunction with the specified name, wrapper for UClass::FindFunctionByName()
 
UFunction * FindFunctionChecked (FName InName) const
 Version of FindFunction() that will assert if the function was not found
 
virtual void FinishDestroy ()
 Called to finish destroying the object. 更多...
 
UObject * GetArchetype () const
 Return the template this object is based on. 更多...
 
void GetArchetypeInstances (TArray< UObject * > &Instances)
 Builds a list of objects which have this object in their archetype chain. 更多...
 
virtual void GetAssetRegistryTags (TArray< FAssetRegistryTag > &OutTags) const
 Gathers a list of asset registry searchable tags which are name/value pairs with some type information This only needs to be implemented for asset objects 更多...
 
virtual const TCHAR * GetConfigOverridePlatform () const
 Returns the override config hierarchy platform (if NDAd platforms need defaults to not be in Base*.ini but still want editor to load them)
 
FString GetDefaultConfigFilename () const
 Get the default config filename for the specified UObject
 
virtual FString GetDesc ()
 Return a one line description of an object for viewing in the thumbnail view of the generic browser
 
FString GetDetailedInfo () const
 This will return detail info about this specific object. 更多...
 
virtual FName GetExporterName (void)
 Returns the name of the exporter factory used to export this object Used when multiple factories have the same extension
 
virtual int32 GetFunctionCallspace (UFunction *Function, FFrame *Stack)
 Return the space this function should be called. 更多...
 
FString GetGlobalUserConfigFilename () const
 Get the global user override config filename for the specified UObject
 
virtual void GetLifetimeReplicatedProps (TArray< class FLifetimeProperty > &OutLifetimeProps) const
 Returns properties that are replicated for the lifetime of the actor channel
 
virtual bool GetNativePropertyValues (TMap< FString, FString > &out_PropertyValues, uint32 ExportFlags=0) const
 Callback for retrieving a textual representation of natively serialized properties. 更多...
 
virtual int32 GetNetPushIdDynamic () const
 Should only ever be used by internal systems.
 
virtual void GetPreloadDependencies (TArray< UObject * > &OutDeps)
 Called during cooking. 更多...
 
virtual void GetPrestreamPackages (TArray< UObject * > &OutPrestream)
 Called during cooking. 更多...
 
virtual FPrimaryAssetId GetPrimaryAssetId () const
 Returns an Type:Name pair representing the PrimaryAssetId for this object. 更多...
 
FString GetProjectUserConfigFilename () const
 Get the project user override config filename for the specified UObject
 
SIZE_T GetResourceSizeBytes (EResourceSizeMode::Type Mode)
 Get the size of the object/resource for use in memory tools or to display to artists/LDs in the Editor This is the simple version which just returns the total number of bytes used by this object. 更多...
 
virtual void GetResourceSizeEx (FResourceSizeEx &CumulativeResourceSize)
 Get the size of the object/resource for use in memory tools or to display to artists/LDs in the Editor This is the extended version which separates up the used memory into different memory regions (the actual definition of which may be platform specific). 更多...
 
virtual FRestoreForUObjectOverwrite * GetRestoreForUObjectOverwrite ()
 Save information for StaticAllocateObject in the case of overwriting an existing object. 更多...
 
virtual UScriptStruct * GetSparseClassDataStruct () const
 Return the UStruct corresponding to the sidecar data structure that stores data that is constant for all instances of this class.
 
virtual void GetSubobjectsWithStableNamesForNetworking (TArray< UObject * > &ObjList)
 Returns a list of sub-objects that have stable names for networking
 
template<class T >
FORCEINLINE bool Implements () const
 Returns true if this object implements the interface T, false otherwise.
 
template<class T >
bool Implements () const
 Returns true if this object implements the interface T, false otherwise.
 
virtual void ImportCustomProperties (const TCHAR *SourceText, FFeedbackContext *Warn)
 Exports the property values for the specified object as text to the output device. 更多...
 
void InstanceSubobjectTemplates (struct FObjectInstancingGraph *InstanceGraph=NULL)
 Wrapper for calling UClass::InstanceSubobjectTemplates() for this object.
 
virtual bool IsAsset () const
 Returns true if this object is considered an asset.
 
bool IsBasedOnArchetype (const UObject *const SomeObject) const
 Determine if this object has SomeObject in its archetype chain.
 
virtual bool IsDestructionThreadSafe () const
 Called during garbage collection to determine if an object can have its destructor called on a worker thread. 更多...
 
virtual bool IsEditorOnly () const
 Called during saving to determine if the object is forced to be editor only or not 更多...
 
virtual bool IsFullNameStableForNetworking () const
 IsFullNameStableForNetworking means an object can be referred to its full path name over the network
 
bool IsInBlueprint () const
 Returns whether this object is contained in or part of a blueprint object
 
virtual bool IsLocalizedResource () const
 Returns true if this object is considered a localized resource.
 
virtual bool IsNameStableForNetworking () const
 IsNameStableForNetworking means an object can be referred to its path name (relative to outer) over the network
 
virtual bool IsPostLoadThreadSafe () const
 Called during async load to determine if PostLoad can be called on the loading thread. 更多...
 
virtual bool IsReadyForAsyncPostLoad () const
 Called before calling PostLoad() in FAsyncPackage::PostLoadObjects(). 更多...
 
virtual bool IsReadyForFinishDestroy ()
 Called to check if the object is ready for FinishDestroy. 更多...
 
virtual bool IsSafeForRootSet () const
 Returns true if this object is safe to add to the root set.
 
bool IsSelected () const
 Test the selection state of a UObject 更多...
 
virtual bool IsSupportedForNetworking () const
 IsSupportedForNetworking means an object can be referenced over the network
 
void LoadConfig (UClass *ConfigClass=NULL, const TCHAR *Filename=NULL, uint32 PropagationFlags=UE4::LCPF_None, class FProperty *PropertyToLoad=NULL)
 Imports property values from an .ini file. 更多...
 
virtual void MarkAsEditorOnlySubobject ()
 Called during subobject creation to mark this component as editor only, which causes it to get stripped in packaged builds
 
FORCEINLINE bool Modify (bool bAlwaysMarkDirty=true)
 Note that the object will be modified. 更多...
 
virtual bool NeedsLoadForClient () const
 Called during saving to determine the load flags to save with the object. 更多...
 
virtual bool NeedsLoadForEditorGame () const
 Called during saving to include this object in client/servers running in editor builds, even if they wouldn't normally be. 更多...
 
virtual bool NeedsLoadForServer () const
 Called during saving to determine the load flags to save with the object. 更多...
 
virtual bool NeedsLoadForTargetPlatform (const class ITargetPlatform *TargetPlatform) const
 Called during saving to determine the load flags to save with the object. 更多...
 
void OutputReferencers (FOutputDevice &Ar, FReferencerInformationList *Referencers=NULL)
 Outputs a string to an arbitrary output device, describing the list of objects which are holding references to this one. 更多...
 
virtual void OverridePerObjectConfigSection (FString &SectionName)
 Allows PerObjectConfig classes, to override the ini section name used for the PerObjectConfig object. 更多...
 
void ParseParms (const TCHAR *Parms)
 Import an object from a file.
 
virtual void PostCDOContruct ()
 Called after the C++ constructor has run on the CDO for a class. 更多...
 
virtual void PostDuplicate (bool bDuplicateForPIE)
 Called after duplication & serialization and before PostLoad. 更多...
 
virtual void PostEditImport ()
 Called after importing property values for this object (paste, duplicate or .t3d import) Allow the object to perform any cleanup for properties which shouldn't be duplicated or are unsupported by the script serialization
 
virtual void PostInitProperties ()
 Called after the C++ constructor and after the properties have been initialized, including those loaded from config. 更多...
 
virtual void PostInterpChange (FProperty *PropertyThatChanged)
 This is called when property is modified by InterpPropertyTracks 更多...
 
virtual void PostLoad ()
 Do any object-specific cleanup required immediately after loading an object. 更多...
 
virtual void PostLoadSubobjects (FObjectInstancingGraph *OuterInstanceGraph)
 Instances components for objects being loaded from disk, if necessary. 更多...
 
virtual void PostNetReceive ()
 Called right after receiving a bunch
 
virtual void PostReloadConfig (class FProperty *PropertyThatWasLoaded)
 Called from ReloadConfig after the object has reloaded its configuration data.
 
virtual void PostRename (UObject *OldOuter, const FName OldName)
 Called at the end of Rename(), but only if the rename was actually carried out
 
virtual void PostRepNotifies ()
 Called right after calling all OnRep notifies (called even when there are no notifies)
 
virtual void PostSaveRoot (bool bCleanupIsRequired)
 Called from within SavePackage on the passed in base/root object. 更多...
 
virtual void PreDestroyFromReplication ()
 Called right before being marked for destruction due to network replication
 
virtual void PreDuplicate (FObjectDuplicationParameters &DupParams)
 Called before duplication. 更多...
 
virtual void PreNetReceive ()
 Called right before receiving a bunch
 
virtual void PreSave (const class ITargetPlatform *TargetPlatform)
 Presave function. 更多...
 
virtual bool PreSaveRoot (const TCHAR *Filename)
 Called from within SavePackage on the passed in base/root object. 更多...
 
virtual bool ProcessConsoleExec (const TCHAR *Cmd, FOutputDevice &Ar, UObject *Executor)
 This function handles a console exec sent to the object; it is virtual so 'nexus' objects like a player controller can reroute the command to several different objects.
 
virtual void ProcessEvent (UFunction *Function, void *Parms)
 Called by VM to execute a UFunction with a filled in UStruct of parameters
 
virtual UClass * RegenerateClass (UClass *ClassToRegenerate, UObject *PreviousCDO)
 Called on the target when a class is loaded with ClassGeneratedBy is loaded. 更多...
 
void ReinitializeProperties (UObject *SourceObject=NULL, struct FObjectInstancingGraph *InstanceGraph=NULL)
 Wrapper function for InitProperties() which handles safely tearing down this object before re-initializing it from the specified source object. 更多...
 
void ReloadConfig (UClass *ConfigClass=NULL, const TCHAR *Filename=NULL, uint32 PropagationFlags=UE4::LCPF_None, class FProperty *PropertyToLoad=NULL)
 Wrapper method for LoadConfig that is used when reloading the config data for objects at runtime which have already loaded their config data at least once. 更多...
 
virtual bool Rename (const TCHAR *NewName=nullptr, UObject *NewOuter=nullptr, ERenameFlags Flags=REN_None)
 Rename this object to a unique name, or change its outer. 更多...
 
void RetrieveReferencers (TArray< FReferencerInformation > *OutInternalReferencers, TArray< FReferencerInformation > *OutExternalReferencers)
 Called by OutputReferencers() to get the internal list of referencers to write
 
void SaveConfig (uint64 Flags=CPF_Config, const TCHAR *Filename=NULL, FConfigCacheIni *Config=GConfig, bool bAllowCopyToDefaultObject=true)
 Save configuration out to ini files 更多...
 
virtual void Serialize (FArchive &Ar)
 Handles reading, writing, and reference collecting using FArchive. 更多...
 
void SerializeScriptProperties (FArchive &Ar) const
 Serializes the script property data located at Data. 更多...
 
void SerializeScriptProperties (FStructuredArchive::FSlot Slot) const
 Serializes the script property data located at Data. 更多...
 
void SetLinker (FLinkerLoad *LinkerLoad, int32 LinkerIndex, bool bShouldDetachExisting=true)
 Changes the linker and linker index to the passed in one. 更多...
 
virtual void ShutdownAfterError ()
 After a critical error, perform any mission-critical cleanup, such as restoring the video mode orreleasing hardware resources.
 
void SkipFunction (FFrame &Stack, RESULT_DECL, UFunction *Function)
 advances Stack's code past the parameters to the given Function and if the function has a return value, copies the zero value for that property to the memory for the return value 更多...
 
virtual void TagSubobjects (EObjectFlags NewFlags)
 Tags objects that are part of the same asset with the specified object flag, used for GC checking 更多...
 
void UpdateDefaultConfigFile (const FString &SpecificFileLocation="")
 Saves just the section(s) for this class into the default ini file for the class (with just the changes from base)
 
void UpdateGlobalUserConfigFile ()
 Saves just the section(s) for this class into the global user ini file for the class (with just the changes from base)
 
void UpdateProjectUserConfigFile ()
 Saves just the section(s) for this class into the project user ini file for the class (with just the changes from base)
 
void UpdateSinglePropertyInConfigFile (const FProperty *InProperty, const FString &InConfigIniName)
 Saves just the property into the global user ini file for the class (with just the changes from base)
 
- Public 成员函数 继承自 UObjectBaseUtility
void AddToCluster (UObjectBaseUtility *ClusterRootOrObjectFromCluster, bool bAddAsMutableObject=false)
 Adds this objects to a GC cluster that already exists 更多...
 
FORCEINLINE void AddToRoot ()
 Add an object to the root set. 更多...
 
FORCEINLINE void AppendName (FString &ResultString) const
 Optimized version of GetName that appends to an existing string
 
FORCEINLINE bool AtomicallyClearInternalFlags (EInternalObjectFlags FlagsToClear) const
 Atomically clears passed in internal flags. 更多...
 
virtual bool CanBeClusterRoot () const
 Called after load to determine if the object can be a cluster root 更多...
 
virtual bool CanBeInCluster () const
 Called during cluster construction if the object can be added to a cluster 更多...
 
FORCEINLINE void ClearFlags (EObjectFlags NewFlags)
 Clears subset of flags for a specific object
 
FORCEINLINE void ClearInternalFlags (EInternalObjectFlags FlagsToClear) const
 Clears passed in internal flags. 更多...
 
FORCEINLINE void ClearPendingKill ()
 Unmarks this object as PendingKill.
 
virtual void CreateCluster ()
 Called after PostLoad to create UObject cluster
 
void DetachExternalPackage ()
 Utility function to temporarily detach the object external package, if any GetPackage will report the outer's package once detached
 
const UClass * FindNearestCommonBaseClass (const UClass *TestClass) const
 Finds the most-derived class which is a parent of both TestClass and this object's class. 更多...
 
FORCEINLINE EObjectMark GetAllMarks () const
 Returns all of the object marks on a specific object 更多...
 
FString GetFullGroupName (bool bStartWithOuter) const
 Walks up the chain of packages until it reaches the top level, which it ignores. 更多...
 
void GetFullName (const UObject *StopOuter, FString &ResultString, EObjectFullNameFlags Flags=EObjectFullNameFlags::None) const
 Version of GetFullName() that eliminates unnecessary copies.
 
FString GetFullName (const UObject *StopOuter=NULL, EObjectFullNameFlags Flags=EObjectFullNameFlags::None) const
 Returns the fully qualified pathname for this object as well as the name of the class, in the format: 'ClassName Outermost[.Outer].Name'. 更多...
 
void * GetInterfaceAddress (UClass *InterfaceClass)
 Returns a pointer to this object safely converted to a pointer of the specified interface class. 更多...
 
FORCEINLINE EInternalObjectFlags GetInternalFlags () const
 Gets internal flags. 更多...
 
class FLinkerLoad * GetLinker () const
 Returns the linker for this object. 更多...
 
int32 GetLinkerCustomVersion (FGuid CustomVersionKey) const
 Returns the custom version of the linker for this object corresponding to the given custom version key. 更多...
 
int32 GetLinkerIndex () const
 Returns this object's LinkerIndex. 更多...
 
int32 GetLinkerLicenseeUE4Version () const
 Returns the licensee version of the linker for this object. 更多...
 
int32 GetLinkerUE4Version () const
 Returns the UE4 version of the linker for this object. 更多...
 
FORCEINLINE EObjectFlags GetMaskedFlags (EObjectFlags Mask=RF_AllFlags) const
 Returns object flags that are both in the mask and set on the object. 更多...
 
FORCEINLINE FString GetName () const
 Returns the name of this object (with no path information) 更多...
 
FORCEINLINE void GetName (FString &ResultString) const
 Optimized version of GetName that overwrites an existing string
 
void * GetNativeInterfaceAddress (UClass *InterfaceClass)
 Returns a pointer to the I* native interface object that this object implements. 更多...
 
const void * GetNativeInterfaceAddress (UClass *InterfaceClass) const
 Returns a pointer to the const I* native interface object that this object implements. 更多...
 
UPackage * GetOutermost () const
 Legacy function, has the same behavior as GetPackage use GetPackage instead. 更多...
 
UObject * GetOutermostObject () const
 Walks up the list of outers until it finds the top-level one that isn't a package. 更多...
 
UPackage * GetPackage () const
 Walks up the list of outers until it finds a package directly associated with the object. 更多...
 
void GetPathName (const UObject *StopOuter, FString &ResultString) const
 Versions of GetPathName() that eliminates unnecessary copies and allocations.
 
FString GetPathName (const UObject *StopOuter=NULL) const
 Returns the fully qualified pathname for this object, in the format: 'Outermost[.Outer].Name' 更多...
 
FORCEINLINE TStatId GetStatID (bool bForDeferredUse=false) const
 Returns the stat ID of the object, used for profiling. 更多...
 
template<typename T >
T * GetTypedOuter () const
 Traverses the outer chain searching for the next object of a certain type. 更多...
 
UObject * GetTypedOuter (UClass *Target) const
 Traverses the outer chain searching for the next object of a certain type. 更多...
 
FORCEINLINE bool HasAllFlags (EObjectFlags FlagsToCheck) const
 Used to safely check whether all of the passed in flags are set. 更多...
 
FORCEINLINE bool HasAllMarks (EObjectMark Marks) const
 Tests an object for having ALL of a set of marks 更多...
 
FORCEINLINE bool HasAnyFlags (EObjectFlags FlagsToCheck) const
 Used to safely check whether any of the passed in flags are set. 更多...
 
FORCEINLINE bool HasAnyInternalFlags (EInternalObjectFlags FlagsToCheck) const
 Used to safely check whether any of the passed in internal flags are set. 更多...
 
FORCEINLINE bool HasAnyMarks (EObjectMark Marks) const
 Tests an object for having ANY of a set of marks 更多...
 
template<class T >
bool IsA () const
 Returns true if this object is of the template type.
 
template<typename OtherClassType >
FORCEINLINE bool IsA (OtherClassType SomeBase) const
 Returns true if this object is of the specified type.
 
bool IsDefaultSubobject () const
 Returns whether this component was instanced from a component/subobject template, or if it is a component/subobject template. 更多...
 
bool IsIn (const UObject *SomeOuter) const
 Return the dispatch to IsInOuter or IsInPackage depending on SomeOuter's class. 更多...
 
bool IsIn (const UPackage *SomePackage) const
 Overload to determine if an object is in the specified package which can now be different than its outer chain. 更多...
 
bool IsInA (const UClass *SomeBaseClass) const
 Find out if this object is inside (has an outer) that is of the specified class 更多...
 
bool IsInOuter (const UObject *SomeOuter) const
 Returns true if the object is contained in the specified outer.
 
bool IsInPackage (const UPackage *SomePackage) const
 Returns true if the object is contained in the specified package.
 
FORCEINLINE bool IsNative () const
 Checks if the object is native.
 
FORCEINLINE bool IsPendingKill () const
 Checks the PendingKill flag to see if it is dead but memory still valid
 
FORCEINLINE bool IsPendingKillOrUnreachable () const
 Checks if the object is pending kill or unreachable.
 
FORCEINLINE bool IsRooted () const
 Returns true if this object is explicitly rooted 更多...
 
bool IsTemplate (EObjectFlags TemplateTypes=RF_ArchetypeObject|RF_ClassDefaultObject) const
 Determines whether this object is a template object 更多...
 
FORCEINLINE bool IsUnreachable () const
 Checks if the object is unreachable.
 
FORCEINLINE void Mark (EObjectMark Marks) const
 Adds marks to an object 更多...
 
bool MarkPackageDirty () const
 Finds the outermost package and marks it dirty. 更多...
 
FORCEINLINE void MarkPendingKill ()
 Marks this object as RF_PendingKill.
 
virtual void OnClusterMarkedAsPendingKill ()
 Called during Garbage Collection to perform additional cleanup when the cluster is about to be destroyed due to PendingKill flag being set on it.
 
FORCEINLINE bool operator< (const UObjectBaseUtility &Other) const
 Overloaded < operator. 更多...
 
void ReattachExternalPackage ()
 Utility function to reattach the object external package, if any GetPackage will report the object external package if set after this call
 
FORCEINLINE void RemoveFromRoot ()
 Remove an object from the root set.
 
bool RootPackageHasAnyFlags (uint32 CheckFlagMask) const
 Checks whether this object's top-most package has any of the specified flags 更多...
 
FORCEINLINE void SetFlags (EObjectFlags NewFlags)
 Modifies object flags for a specific object
 
FORCEINLINE void SetInternalFlags (EInternalObjectFlags FlagsToSet) const
 Clears passed in internal flags. 更多...
 
FORCEINLINE bool ThisThreadAtomicallyClearedRFUnreachable ()
 Atomically clear the unreachable flag 更多...
 
FORCEINLINE void UnMark (EObjectMark Marks) const
 Removes marks from and object 更多...
 
- Public 成员函数 继承自 UObjectBase
FORCENOINLINE void AtomicallyClearFlags (EObjectFlags FlagsToClear)
 Atomically clears the specified flags. 更多...
 
FORCENOINLINE void AtomicallySetFlags (EObjectFlags FlagsToAdd)
 Atomically adds the specified flags. 更多...
 
FORCEINLINE UClass * GetClass () const
 Returns the UClass that defines the fields of this object
 
UPackage * GetExternalPackage () const
 Returns the external UPackage associated with this object, if any
 
UPackage * GetExternalPackageInternal () const
 Returns the external UPackage for this object, if any, NOT THREAD SAFE, used by internal gc reference collecting.
 
FORCEINLINE EObjectFlags GetFlags () const
 Retrieve the object flags directly 更多...
 
FORCEINLINE FName GetFName () const
 Returns the logical name of this object
 
FORCEINLINE UObject * GetOuter () const
 Returns the UObject this object resides in
 
FORCEINLINE uint32 GetUniqueID () const
 Returns the unique ID of the object...these are reused so it is only unique while the object is alive. 更多...
 
bool IsValidLowLevel () const
 Checks to see if the object appears to be valid 更多...
 
bool IsValidLowLevelFast (bool bRecursive=true) const
 Faster version of IsValidLowLevel. 更多...
 
void SetExternalPackage (UPackage *InPackage)
 Associate an external package directly to this object.
 
 UObjectBase (UClass *InClass, EObjectFlags InFlags, EInternalObjectFlags InInternalFlags, UObject *InOuter, FName InName)
 Constructor used by StaticAllocateObject 更多...
 
virtual ~UObjectBase ()
 Final destructor, removes the object from the object array, and indirectly, from any annotations
 

静态 Public 成员函数

static const FName GetCanBeDamagedPropertyName ()
 Gets the property name for bCanBeDamaged. 更多...
 
static FString GetDebugName (const AActor *Actor)
 Retrieves actor's name used for logging, or string "NULL" if Actor is null
 
static const FName GetHiddenPropertyName ()
 Gets the property name for bHidden. 更多...
 
static const FName GetInstigatorPropertyName ()
 Gets the property name for Instigator. 更多...
 
static const FName GetReplicateMovementPropertyName ()
 Gets the property name for bReplicateMovement. 更多...
 
static const FName GetRolePropertyName ()
 Gets the property name for Role. 更多...
 
static void MakeNoiseImpl (AActor *NoiseMaker, float Loudness, APawn *NoiseInstigator, const FVector &NoiseLocation, float MaxRange, FName Tag)
 Default Implementation of MakeNoise
 
static void SetMakeNoiseDelegate (const FMakeNoiseDelegate &NewDelegate)
 Modifies the global delegate used for handling MakeNoise
 
- 静态 Public 成员函数 继承自 UObject
static void AddReferencedObjects (UObject *InThis, FReferenceCollector &Collector)
 Callback used to allow object register its direct object references that are not already covered by the token stream. 更多...
 
static bool CanCreateInCurrentContext (UObject *Template)
 Determines if you can create an object from the supplied template in the current context (editor, client only, dedicated server, game/listen) This calls NeedsLoadForClient & NeedsLoadForServer
 
static UObject * GetArchetypeFromRequiredInfo (const UClass *Class, const UObject *Outer, FName Name, EObjectFlags ObjectFlags)
 Return the template that an object with this class, outer and name would be 更多...
 
static const FName & SourceFileTagName ()
 Get the common tag name used for all asset source file import paths
 
static void UpdateClassesExcludedFromDedicatedClient (const TArray< FString > &InClassNames, const TArray< FString > &InModulesNames)
 Update the list of classes that we should exclude from dedicated client builds
 
static void UpdateClassesExcludedFromDedicatedServer (const TArray< FString > &InClassNames, const TArray< FString > &InModulesNames)
 Update the list of classes that we should exclude from dedicated server builds
 
- 静态 Public 成员函数 继承自 UObjectBase
static void EmitBaseReferences (UClass *RootClass)
 Emit GC tokens for UObjectBase, this might be UObject::StaticClass or Default__Class
 
static FString RemoveClassPrefix (const TCHAR *ClassName)
 Removes the class prefix from the given string
 

Public 属性

TEnumAsByte< EAutoReceiveInput::Type > AutoReceiveInput
 Automatically registers this actor to receive input from a player.
 
uint8 bActorIsBeingConstructed: 1
 Set while actor is being constructed. 更多...
 
uint8 bActorSeamlessTraveled:1
 Indicates the actor was pulled through a seamless travel. 更多...
 
uint8 bAllowTickBeforeBeginPlay:1
 Whether we allow this Actor to tick before it receives the BeginPlay event. 更多...
 
uint8 bAlwaysRelevant:1
 Always relevant for network (overrides bOnlyRelevantToOwner).
 
uint8 bBlockInput:1
 If true, all input on the stack below this actor will not be considered
 
uint8 bCollideWhenPlacing:1
 This actor collides with the world when placing in the editor, even if RootComponent collision is disabled. 更多...
 
uint8 bEnableAutoLODGeneration:1
 If true, and if World setting has bEnableHierarchicalLOD equal to true, then it will generate LODActor from groups of clustered Actor
 
uint8 bExchangedRoles:1
 Whether we have already exchanged Role/RemoteRole on the client, as when removing then re-adding a streaming level. 更多...
 
uint8 bFindCameraComponentWhenViewTarget:1
 If true, this actor should search for an owned camera component to view through when used as a view target.
 
uint8 bGenerateOverlapEventsDuringLevelStreaming:1
 If true, this actor will generate overlap Begin/End events when spawned as part of level streaming, which includes initial level load. 更多...
 
uint8 bIgnoresOriginShifting:1
 Whether this actor should not be affected by world origin shifting.
 
uint8 bIsEditorOnlyActor:1
 Whether this actor is editor-only. 更多...
 
TArray< UActorComponent * > BlueprintCreatedComponents
 Array of ActorComponents that are created by blueprints and serialized per-instance.
 
uint8 bNetLoadOnClient:1
 This actor will be loaded on network clients during map load
 
uint8 bNetStartup:1
 If true, this actor was loaded directly from the map, and for networking purposes can be addressed by its full path name
 
uint8 bNetTemporary:1
 If true, when the actor is spawned it will be sent to the client but receive no further replication updates from the server afterwards.
 
uint8 bNetUseOwnerRelevancy:1
 If actor has valid Owner, call Owner's IsNetRelevantFor and GetNetPriority
 
uint8 bOnlyRelevantToOwner:1
 If true, this actor is only relevant to its owner. 更多...
 
uint8 bRelevantForLevelBounds:1
 If true, this actor's component's bounds will be included in the level's bounding box unless the Actor's class has overridden IsLevelBoundsRelevant
 
uint8 bRelevantForNetworkReplays:1
 If true, this actor will be replicated to network replays (default is true)
 
uint8 bReplayRewindable:1
 If true, this actor will only be destroyed during scrubbing if the replay is set to a time before the actor existed. 更多...
 
TArray< AActor * > Children
 Array of all Actors whose Owner is this actor, these are not necessarily spawned by UChildActorComponent
 
float CreationTime
 The time this actor was created, relative to World->GetTimeSeconds(). 更多...
 
float CustomTimeDilation
 Allow each actor to run at a different time speed. 更多...
 
FRenderCommandFence DetachFence
 A fence to track when the primitive is detached from the scene in the rendering thread.
 
float InitialLifeSpan
 How long this Actor lives before dying, 0=forever. 更多...
 
class UInputComponent * InputComponent
 Component that handles input for this actor, if input is enabled.
 
int32 InputPriority
 The priority of this input component when pushed in to the stack.
 
TArray< FName > Layers
 Layers the actor belongs to. 更多...
 
float MinNetUpdateFrequency
 Used to determine what rate to throttle down to when replicated properties are changing infrequently
 
float NetCullDistanceSquared
 Square of the max distance from the client's viewpoint that this actor is relevant and will be replicated.
 
TEnumAsByte< enum ENetDormancy > NetDormancy
 Dormancy setting for actor to take itself off of the replication list without being destroyed on clients.
 
float NetPriority
 Priority for this actor when checking for replication in a low bandwidth or saturated situation, higher priority means it is more likely to replicate
 
int32 NetTag
 Internal - used by UNetDriver
 
float NetUpdateFrequency
 How often (per second) this actor will be considered for replication, used to determine NetUpdateTime
 
FActorBeginOverlapSignature OnActorBeginOverlap
 Called when another actor begins to overlap this actor, for example a player walking into a trigger. 更多...
 
FActorEndOverlapSignature OnActorEndOverlap
 Called when another actor stops overlapping this actor. 更多...
 
FActorHitSignature OnActorHit
 Called when this Actor hits (or is hit by) something solid. 更多...
 
FActorBeginCursorOverSignature OnBeginCursorOver
 Called when the mouse cursor is moved over this actor if mouse over events are enabled in the player controller.
 
FActorOnClickedSignature OnClicked
 Called when the left mouse button is clicked while the mouse is over this actor and click events are enabled in the player controller.
 
FActorDestroyedSignature OnDestroyed
 Event triggered when the actor has been explicitly destroyed.
 
FActorEndCursorOverSignature OnEndCursorOver
 Called when the mouse cursor is moved off this actor if mouse over events are enabled in the player controller.
 
FActorEndPlaySignature OnEndPlay
 Event triggered when the actor is being deleted or removed from a level.
 
FActorOnInputTouchBeginSignature OnInputTouchBegin
 Called when a touch input is received over this actor when touch events are enabled in the player controller.
 
FActorOnInputTouchEndSignature OnInputTouchEnd
 Called when a touch input is received over this component when touch events are enabled in the player controller.
 
FActorBeginTouchOverSignature OnInputTouchEnter
 Called when a finger is moved over this actor when touch over events are enabled in the player controller.
 
FActorEndTouchOverSignature OnInputTouchLeave
 Called when a finger is moved off this actor when touch over events are enabled in the player controller.
 
FActorOnReleasedSignature OnReleased
 Called when the left mouse button is released while the mouse is over this actor and click events are enabled in the player controller.
 
FTakeAnyDamageSignature OnTakeAnyDamage
 Called when the actor is damaged in any way.
 
FTakePointDamageSignature OnTakePointDamage
 Called when the actor is damaged by point damage.
 
FTakeRadialDamageSignature OnTakeRadialDamage
 Called when the actor is damaged by radial damage.
 
struct FActorTickFunction PrimaryActorTick
 Primary Actor tick function, which calls TickActor(). 更多...
 
ESpawnActorCollisionHandlingMethod SpawnCollisionHandlingMethod
 Controls how to handle spawning this actor in a situation where it's colliding with something else. 更多...
 
TArray< FName > Tags
 Array of tags that can be used for grouping and categorizing.
 

静态 Public 属性

static FOnProcessEvent ProcessEventDelegate
 Delegate for globally hooking ProccessEvent calls - used by a non-public testing plugin
 

Protected 成员函数

virtual void BeginPlay ()
 Overridable native event for when play begins for this actor.
 
bool CheckActorComponents () const
 Checks components for validity, implemented in AActor
 
virtual void EndPlay (const EEndPlayReason::Type EndPlayReason)
 Overridable function called whenever this actor is being removed from a level
 
bool IsWithinNetRelevancyDistance (const FVector &SrcLocation) const
 Determines whether or not the distance between the given SrcLocation and the Actor's location is within the net relevancy distance. 更多...
 
virtual void OnRep_Owner ()
 Called when owner changes, does nothing by default but can be overridden
 
void PostCreateBlueprintComponent (UActorComponent *NewActorComp)
 Called after instancing a new Blueprint Component from either a template or cooked data.
 
void ProcessUserConstructionScript ()
 Runs UserConstructionScript, delays component registration until it's complete.
 
void ReceiveBeginPlay ()
 Event when play begins for this actor.
 
void ReceiveEndPlay (EEndPlayReason::Type EndPlayReason)
 Event to notify blueprints this actor is being deleted or removed from a level.
 
virtual void RegisterActorTickFunctions (bool bRegister)
 Virtual call chain to register all tick functions for the actor class hierarchy 更多...
 
void SetRemoteRoleForBackwardsCompat (const ENetRole InRemoteRole)
 This function should only be used in the constructor of classes that need to set the RemoteRole for backwards compatibility purposes
 
void SyncReplicatedPhysicsSimulation ()
 Sync IsSimulatingPhysics() with ReplicatedMovement.bRepPhysics
 
- Protected 成员函数 继承自 UObject
bool CanCheckDefaultSubObjects (bool bForceCheck, bool &bResult) const
 Checks it's ok to perform subobjects check at this time.
 
virtual bool CheckDefaultSubobjectsInternal () const
 Checks default sub-object assumptions. 更多...
 
virtual FString GetDetailedInfoInternal () const
 This function actually does the work for the GetDetailedInfo() and is virtual. 更多...
 
- Protected 成员函数 继承自 UObjectBase
virtual void DeferredRegister (UClass *UClassStaticClass, const TCHAR *PackageName, const TCHAR *Name)
 Convert a boot-strap registered class into a real one, add to uobject array, etc 更多...
 
void LowLevelRename (FName NewName, UObject *NewOuter=NULL)
 Just change the FName and Outer and rehash into name hash tables. 更多...
 
void Register (const TCHAR *PackageName, const TCHAR *Name)
 Enqueue the registration for this object.
 
virtual void RegisterDependencies ()
 Force any base classes to be registered first
 
FORCEINLINE void SetFlagsTo (EObjectFlags NewFlags)
 Set the object flags directly 更多...
 
 UObjectBase (EObjectFlags InFlags)
 Constructor used for bootstrapping 更多...
 

Protected 属性

uint8 bAllowReceiveTickEventOnDedicatedServer:1
 If false, the Blueprint ReceiveTick() event will be disabled on dedicated servers. 更多...
 
uint8 bCanBeInCluster:1
 If true, this actor can be put inside of a GC Cluster to improve Garbage Collection performance
 
uint8 bNetCheckedInitialPhysicsState: 1
 Flag indicating we have checked initial simulating physics state to sync networked proxies to the server.
 
uint8 bReplicates:1
 If true, this actor will replicate to remote machines 更多...
 
TArray< class AMatineeActor * > ControllingMatineeActors
 The matinee actors that control this actor.
 
FName NetDriverName
 Used to specify the net driver to replicate on (NAME_None || NAME_GameNetDriver is the default net driver)
 
TArray< UActorComponent * > ReplicatedComponents
 Set of replicated components, stored as an array to save space as this is generally not very large
 
USceneComponent * RootComponent
 The component that defines the transform (location, rotation, scale) of this Actor in the world, all other components must be attached to this one somehow
 
FTimerHandle TimerHandle_LifeSpanExpired
 Handle for efficient management of LifeSpanExpired timer
 
EActorUpdateOverlapsMethod UpdateOverlapsMethodDuringLevelStreaming
 Condition for calling UpdateOverlaps() to initialize overlap state when loaded in during level streaming. 更多...
 

友元

struct FActorLastRenderTime
 
struct FMarkActorIsBeingDestroyed
 
struct FSetActorWantsDestroyDuringBeginPlay
 

额外继承的成员函数

- 静态 Protected 成员函数 继承自 UObjectBaseUtility
static void CreateClusterFromObject (UObjectBaseUtility *ClusterRootObject, UObjectBaseUtility *ReferencingObject)
 Helper function to create a cluster from UObject
 

详细描述

Actor is the base class for an Object that can be placed or spawned in a level.

Actors may contain a collection of ActorComponents, which can be used to control how actors move, how they are rendered, etc. The other main function of an Actor is the replication of properties and function calls across the network during play.

Actor initialization has multiple steps, here's the order of important virtual functions that get called:

参见
https://docs.unrealengine.com/latest/INT/Programming/UnrealArchitecture/Actors/
https://docs.unrealengine.com/en-us/Programming/UnrealArchitecture/Actors/ActorLifecycle
UActorComponent

成员函数说明

◆ ActorGetDistanceToCollision()

float AActor::ActorGetDistanceToCollision ( const FVector &  Point,
ECollisionChannel  TraceChannel,
FVector &  ClosestPointOnCollision,
UPrimitiveComponent **  OutPrimitiveComponent = nullptr 
) const

returns Distance to closest Body Instance surface.

Checks against all components of this Actor having valid collision and blocking TraceChannel.

参数
PointWorld 3D vector
TraceChannelThe 'channel' used to determine which components to consider.
ClosestPointOnCollisionPoint on the surface of collision closest to Point
OutPrimitiveComponentPrimitiveComponent ClosestPointOnCollision is on.
返回
Success if returns > 0.f, if returns 0.f, it is either not convex or inside of the point If returns < 0.f, this Actor does not have any primitive with collision

◆ ActorLineTraceSingle()

bool AActor::ActorLineTraceSingle ( struct FHitResult &  OutHit,
const FVector &  Start,
const FVector &  End,
ECollisionChannel  TraceChannel,
const struct FCollisionQueryParams &  Params 
) const

Trace a ray against the Components of this Actor and return the first blocking hit

参数
OutHitFirst blocking hit found
StartStart location of the ray
EndEnd location of the ray
TraceChannelThe 'channel' that this ray is in, used to determine which components to hit
ParamsAdditional parameters used for the trace
返回
TRUE if a blocking hit is found

◆ ActorToWorld()

FORCEINLINE const FTransform & AActor::ActorToWorld ( ) const
inline

Get the local-to-world transform of the RootComponent.

Identical to GetTransform().

◆ AddComponent()

UActorComponent * AActor::AddComponent ( FName  TemplateName,
bool  bManualAttachment,
const FTransform &  RelativeTransform,
const UObject *  ComponentTemplateContext,
bool  bDeferredFinish = false 
)

Creates a new component and assigns ownership to the Actor this is called for.

Automatic attachment causes the first component created to become the root, and all subsequent components to be attached under that root. When bManualAttachment is set, automatic attachment is skipped and it is up to the user to attach the resulting component (or set it up as the root) themselves.

参见
UK2Node_AddComponent DO NOT CALL MANUALLY - BLUEPRINT INTERNAL USE ONLY (for Add Component nodes)
参数
TemplateNameThe name of the Component Template to use.
bManualAttachmentWhether manual or automatic attachment is to be used
RelativeTransformThe relative transform between the new component and its attach parent (automatic only)
ComponentTemplateContextOptional UBlueprintGeneratedClass reference to use to find the template in. If null (or not a BPGC), component is sought in this Actor's class
bDeferredFinishWhether or not to immediately complete the creation and registration process for this component. Will be false if there are expose on spawn properties being set

◆ AddComponentByClass()

UActorComponent * AActor::AddComponentByClass ( TSubclassOf< UActorComponent >  Class,
bool  bManualAttachment,
const FTransform &  RelativeTransform,
bool  bDeferredFinish 
)

Creates a new component and assigns ownership to the Actor this is called for.

Automatic attachment causes the first component created to become the root, and all subsequent components to be attached under that root. When bManualAttachment is set, automatic attachment is skipped and it is up to the user to attach the resulting component (or set it up as the root) themselves.

参见
UK2Node_AddComponentByClass DO NOT CALL MANUALLY - BLUEPRINT INTERNAL USE ONLY (for Add Component nodes)
参数
ClassThe class of component to create
bManualAttachmentWhether manual or automatic attachment is to be used
RelativeTransformThe relative transform between the new component and its attach parent (automatic only)
bDeferredFinishWhether or not to immediately complete the creation and registration process for this component. Will be false if there are expose on spawn properties being set

◆ AddControllingMatineeActor()

void AActor::AddControllingMatineeActor ( AMatineeActor &  InMatineeActor)

Adds a controlling matinee actor for use during matinee playback

参数
InMatineeActorThe matinee actor which controls this actor

◆ AddOwnedComponent()

void AActor::AddOwnedComponent ( UActorComponent *  Component)

Puts a component in to the OwnedComponents array of the Actor.

The Component must be owned by the Actor or else it will assert In general this should not need to be called directly by anything other than UActorComponent functions

◆ AddTickPrerequisiteActor()

virtual void AActor::AddTickPrerequisiteActor ( AActor *  PrerequisiteActor)
virtual

Make this actor tick after PrerequisiteActor.

This only applies to this actor's tick function; dependencies for owned components must be set up separately if desired.

◆ AddTickPrerequisiteComponent()

virtual void AActor::AddTickPrerequisiteComponent ( UActorComponent *  PrerequisiteComponent)
virtual

Make this actor tick after PrerequisiteComponent.

This only applies to this actor's tick function; dependencies for owned components must be set up separately if desired.

◆ ApplyWorldOffset()

virtual void AActor::ApplyWorldOffset ( const FVector &  InOffset,
bool  bWorldShift 
)
virtual

Called by owning level to shift an actor location and all relevant data structures by specified delta

参数
InOffsetOffset vector to shift actor location
bWorldShiftWhether this call is part of whole world shifting

被 APlayerCameraManager , 以及 ANavigationData 重载.

◆ AttachToActor()

void AActor::AttachToActor ( AActor *  ParentActor,
const FAttachmentTransformRules &  AttachmentRules,
FName  SocketName = NAME_None 
)

Attaches the RootComponent of this Actor to the RootComponent of the supplied actor, optionally at a named socket.

参数
ParentActorActor to attach this actor's RootComponent to
AttachmentRulesHow to handle transforms and modification when attaching.
SocketNameSocket name to attach to, if any

◆ AttachToComponent()

void AActor::AttachToComponent ( USceneComponent *  Parent,
const FAttachmentTransformRules &  AttachmentRules,
FName  SocketName = NAME_None 
)

Attaches the RootComponent of this Actor to the supplied component, optionally at a named socket.

It is not valid to call this on components that are not Registered.

参数
ParentParent to attach to.
AttachmentRulesHow to handle transforms and welding when attaching.
SocketNameOptional socket to attach to on the parent.

◆ BecomeViewTarget()

virtual void AActor::BecomeViewTarget ( class APlayerController *  PC)
virtual

Called when this actor becomes the given PlayerController's ViewTarget.

Triggers the Blueprint event K2_OnBecomeViewTarget.

被 APawn 重载.

◆ BeginDestroy()

virtual void AActor::BeginDestroy ( )
overridevirtual

Called before destroying the object.

This is called immediately upon deciding to destroy the object, to allow the object to begin an asynchronous cleanup process.

重载 UObject .

被 AGeometryCollectionDebugDrawActor 重载.

◆ CalcCamera()

virtual void AActor::CalcCamera ( float  DeltaTime,
struct FMinimalViewInfo &  OutResult 
)
virtual

Calculate camera view point, when viewing this actor.

参数
DeltaTimeDelta time seconds since last update
OutResultCamera configuration

被 APlayerController 重载.

◆ CalculateComponentsBoundingBoxInLocalSpace()

virtual FBox AActor::CalculateComponentsBoundingBoxInLocalSpace ( bool  bNonColliding = false,
bool  bIncludeFromChildActors = false 
) const
virtual

Calculates the actor space bounding box of all components in this Actor.

This is slower than GetComponentsBoundingBox(), because the local bounds of the components are not cached – they are recalculated every time this function is called.

参数
bNonCollidingIndicates that you want to include non-colliding components in the bounding box
bIncludeFromChildActorsIf true then recurse in to ChildActor components and find components of the appropriate type in those Actors as well

◆ CallRemoteFunction()

virtual bool AActor::CallRemoteFunction ( UFunction *  Function,
void *  Parms,
FOutParmRec *  OutParms,
FFrame *  Stack 
)
overridevirtual

Call the actor's function remotely

参数
Functionfunction to call
Parametersarguments to the function call
Stackstack frame for the function call

重载 UObject .

◆ CanBeBaseForCharacter()

virtual bool AActor::CanBeBaseForCharacter ( class APawn *  Pawn) const
virtual

Return true if the given Pawn can be "based" on this actor (ie walk on it).

参数
Pawn- The pawn that wants to be based on this actor

被 APawn 重载.

◆ CanBeDamaged()

bool AActor::CanBeDamaged ( ) const
inline

Gets the literal value of bCanBeDamaged.

This exists so subclasses don't need to have direct access to the bCanBeDamaged property so it can be made private later.

◆ CanBeInCluster()

virtual bool AActor::CanBeInCluster ( ) const
overridevirtual

Called during cluster construction if the object can be added to a cluster

返回
true if this object can be inside of a cluster

重载 UObjectBaseUtility .

◆ CheckDefaultSubobjectsInternal()

virtual bool AActor::CheckDefaultSubobjectsInternal ( ) const
overridevirtual

Checks default sub-object assumptions.

返回
true if the assumptions are met, false otherwise.

重载 UObject .

◆ CheckStillInWorld()

virtual bool AActor::CheckStillInWorld ( )
virtual

This will check to see if the Actor is still in the world.

It will check things like the KillZ, outside world bounds, etc. and handle the situation.

◆ ClearComponentOverlaps()

void AActor::ClearComponentOverlaps ( )

Dispatch all EndOverlap for all of the Actor's PrimitiveComponents.

Generally used when removing the Actor from the world.

◆ DebugShowComponentHierarchy()

void AActor::DebugShowComponentHierarchy ( const TCHAR *  Info,
bool  bShowPosition = true 
)

Debug helper to show the component hierarchy of this actor.

参数
InfoOptional String to display at top of info
bShowPositionIf true, will display component's position in world space

◆ Destroy()

bool AActor::Destroy ( bool  bNetForce = false,
bool  bShouldModifyLevel = true 
)

Destroy this actor.

Returns true the actor is destroyed or already marked for destruction, false if indestructible. Destruction is latent. It occurs at the end of the tick.

参数
bNetForce[opt] Ignored unless called during play. Default is false.
bShouldModifyLevel[opt] If true, Modify() the level before removing the actor. Default is true.
返回
true if destroyed or already marked for destruction, false if indestructible.

◆ DestroyNetworkActorHandled()

virtual bool AActor::DestroyNetworkActorHandled ( )
virtual

Called by DestroyActor(), gives actors a chance to op out of actor destruction Used by network code to have the net connection timeout/cleanup first

返回
true if DestroyActor() should not continue with actor destruction, false otherwise

被 APlayerController 重载.

◆ DetachAllSceneComponents()

void AActor::DetachAllSceneComponents ( class USceneComponent *  InParentComponent,
const FDetachmentTransformRules &  DetachmentRules 
)

Detaches all SceneComponents in this Actor from the supplied parent SceneComponent.

参数
InParentComponentSceneComponent to detach this actor's components from
DetachmentRulesRules to apply when detaching components

◆ DetachFromActor()

void AActor::DetachFromActor ( const FDetachmentTransformRules &  DetachmentRules)

Detaches the RootComponent of this Actor from any SceneComponent it is currently attached to.

参数
DetachmentRulesHow to handle transforms when detaching.

◆ DisableInput()

virtual void AActor::DisableInput ( class APlayerController *  PlayerController)
virtual

Removes this actor from the stack of input being handled by a PlayerController.

参数
PlayerControllerThe PlayerController whose input events we no longer want to receive. If null, this actor will stop receiving input from all PlayerControllers.

被 APawn , 以及 APlayerController 重载.

◆ DisplayDebug()

virtual void AActor::DisplayDebug ( class UCanvas *  Canvas,
const class FDebugDisplayInfo &  DebugDisplay,
float &  YL,
float &  YPos 
)
virtual

Draw important Actor variables on canvas.

HUD will call DisplayDebug() on the current ViewTarget when the ShowDebug exec is used

参数
CanvasCanvas to draw on
DebugDisplayContains information about what debug data to display
YL[in] Height of the previously drawn line. [out] Height of the last line drawn by this function.
YPos[in] Y position on Canvas for the previously drawn line. YPos += YL, gives position to draw text for next debug line. [out] Y position on Canvas for the last line drawn by this function.

◆ EnableInput()

virtual void AActor::EnableInput ( class APlayerController *  PlayerController)
virtual

Pushes this actor on to the stack of input being handled by a PlayerController.

参数
PlayerControllerThe PlayerController whose input events we want to receive.

被 APawn , 以及 APlayerController 重载.

◆ EndViewTarget()

virtual void AActor::EndViewTarget ( class APlayerController *  PC)
virtual

Called when this actor is no longer the given PlayerController's ViewTarget.

Also triggers the Blueprint event K2_OnEndViewTarget.

◆ ExecuteConstruction()

bool AActor::ExecuteConstruction ( const FTransform &  Transform,
const struct FRotationConversionCache *  TransformRotationCache,
const class FComponentInstanceDataCache *  InstanceDataCache,
bool  bIsDefaultTransform = false 
)

Run any construction script for this Actor.

Will call OnConstruction.

参数
TransformThe transform to construct the actor at.
TransformRotationCacheOptional rotation cache to use when applying the transform.
InstanceDataCacheOptional cache of state to apply to newly created components (e.g. precomputed lighting)
bIsDefaultTransformWhether or not the given transform is a "default" transform, in which case it can be overridden by template defaults
返回
Returns false if the hierarchy was not error free and we've put the Actor is disaster recovery mode

◆ FindNetworkObjectInfo()

FNetworkObjectInfo * AActor::FindNetworkObjectInfo ( )

Find the FNetworkObjectInfo struct associated with this actor (for the main NetDriver).

返回
The FNetworkObejctInfo associated with this Actor, or nullptr if none was found.

◆ FindOrAddNetworkObjectInfo()

FNetworkObjectInfo * AActor::FindOrAddNetworkObjectInfo ( )

Find the FNetworkObjectInfo struct associated with this actor (for the main NetDriver).

If no info is found, one will be created and added to the main NetDriver.

返回
The FNetworkObejctInfo associated with this Actor, or nullptr if one couldn't be created.

◆ FinishAddComponent()

void AActor::FinishAddComponent ( UActorComponent *  Component,
bool  bManualAttachment,
const FTransform &  RelativeTransform 
)

Completes the creation of a new actor component.

Called either from blueprint after expose on spawn properties are set, or directly from AddComponent

参见
UK2Node_AddComponent DO NOT CALL MANUALLY - BLUEPRINT INTERNAL USE ONLY (for Add Component nodes)
参数
ComponentThe component created in AddComponent to finish creation of
bManualAttachmentWhether manual or automatic attachment is to be used
RelativeTransformThe relative transform between the new component and its attach parent (automatic only)

◆ FinishAndRegisterComponent()

void AActor::FinishAndRegisterComponent ( UActorComponent *  Component)

Helper function to register the specified component, and add it to the serialized components array

参数
ComponentComponent to be finalized

◆ ForEachAttachedActors()

void AActor::ForEachAttachedActors ( TFunctionRef< bool(class AActor *)>  Functor) const

Call a functor for Actors which are attached directly to a component in this actor.

Functor should return true to carry on, false to abort.

◆ ForEachComponent() [1/2]

template<class ComponentType , typename Func >
void AActor::ForEachComponent ( bool  bIncludeFromChildActors,
Func  InFunc 
) const
inline

Calls the compile-time lambda on each component of the specified type

参数
ComponentTypeThe component class to find all components of a class derived from
bIncludeFromChildActorsIf true then recurse in to ChildActor components and find components of the appropriate type in those Actors as well

◆ ForEachComponent() [2/2]

template<typename Func >
void AActor::ForEachComponent ( bool  bIncludeFromChildActors,
Func  InFunc 
) const
inline

Calls the compile-time lambda on each valid component

参数
bIncludeFromChildActorsIf true then recurse in to ChildActor components and find components of the appropriate type in those Actors as well

◆ GetActorBounds()

void AActor::GetActorBounds ( bool  bOnlyCollidingComponents,
FVector &  Origin,
FVector &  BoxExtent,
bool  bIncludeFromChildActors = false 
) const

Returns the bounding box of all components that make up this Actor (excluding ChildActorComponents).

参数
bOnlyCollidingComponentsIf true, will only return the bounding box for components with collision enabled.
OriginSet to the center of the actor in world space
BoxExtentSet to half the actor's size in 3d space
bIncludeFromChildActorsIf true then recurse in to ChildActor components

◆ GetActorEyesViewPoint()

virtual void AActor::GetActorEyesViewPoint ( FVector &  OutLocation,
FRotator &  OutRotation 
) const
virtual

Returns the point of view of the actor.

Note that this doesn't mean the camera, but the 'eyes' of the actor. For example, for a Pawn, this would define the eye height location, and view rotation (which is different from the pawn rotation which has a zeroed pitch component). A camera first person view will typically use this view point. Most traces (weapon, AI) will be done from this view point.

参数
OutLocation- location of view point
OutRotation- view rotation of actor.

被 APawn, APlayerController , 以及 AController 重载.

◆ GetActorForwardVector()

FORCEINLINE_DEBUGGABLE FVector AActor::GetActorForwardVector ( ) const

Get the forward (X) vector (length 1.0) from this Actor, in world space.


◆ GetActorRightVector()

FORCEINLINE_DEBUGGABLE FVector AActor::GetActorRightVector ( ) const

Get the right (Y) vector (length 1.0) from this Actor, in world space.


◆ GetActorTimeDilation()

float AActor::GetActorTimeDilation ( ) const

Get ActorTimeDilation - this can be used for input control or speed control for slomo.

We don't want to scale input globally because input can be used for UI, which do not care for TimeDilation.

◆ GetActorUpVector()

FORCEINLINE_DEBUGGABLE FVector AActor::GetActorUpVector ( ) const

Get the up (Z) vector (length 1.0) from this Actor, in world space.


◆ GetAllChildActors()

void AActor::GetAllChildActors ( TArray< AActor * > &  ChildActors,
bool  bIncludeDescendants = true 
) const

Returns a list of all actors spawned by our Child Actor Components, including children of children.

This does not return the contents of the Children array

◆ GetAttachParentActor()

AActor * AActor::GetAttachParentActor ( ) const

Walk up the attachment chain from RootComponent until we encounter a different actor, and return it.

If we are not attached to a component in a different actor, returns nullptr

◆ GetAttachParentSocketName()

FName AActor::GetAttachParentSocketName ( ) const

Walk up the attachment chain from RootComponent until we encounter a different actor, and return the socket name in the component.

If we are not attached to a component in a different actor, returns NAME_None

◆ GetCanBeDamagedPropertyName()

static const FName AActor::GetCanBeDamagedPropertyName ( )
inlinestatic

Gets the property name for bCanBeDamaged.

This exists so subclasses don't need to have direct access to the bCanBeDamaged property so it can be made private later.

◆ GetComponents() [1/4]

const TSet< UActorComponent * > & AActor::GetComponents ( ) const
inline

Get a direct reference to the Components set rather than a copy with the null pointers removed.

WARNING: anything that could cause the component to change ownership or be destroyed will invalidate this array, so use caution when iterating this set!

◆ GetComponents() [2/4]

template<class T , class AllocatorType >
void AActor::GetComponents ( TArray< T *, AllocatorType > &  OutComponents,
bool  bIncludeFromChildActors = false 
) const
inline

Get all components derived from class 'T' and fill in the OutComponents array with the result.

It's recommended to use TArrays with a TInlineAllocator to potentially avoid memory allocation costs. TInlineComponentArray is defined to make this easier, for example: { TInlineComponentArray<UPrimitiveComponent*> PrimComponents(Actor); }

参数
bIncludeFromChildActorsIf true then recurse in to ChildActor components and find components of the appropriate type in those Actors as well

◆ GetComponents() [3/4]

template<class AllocatorType >
void AActor::GetComponents ( TArray< UActorComponent *, AllocatorType > &  OutComponents,
bool  bIncludeFromChildActors = false 
) const
inline

UActorComponent specialization of GetComponents() to avoid unnecessary casts.

It's recommended to use TArrays with a TInlineAllocator to potentially avoid memory allocation costs. TInlineComponentArray is defined to make this easier, for example: { TInlineComponentArray<UActorComponent*> PrimComponents; Actor->GetComponents(PrimComponents); }

参数
bIncludeFromChildActorsIf true then recurse in to ChildActor components and find components of the appropriate type in those Actors as well

◆ GetComponents() [4/4]

template<class AllocatorType >
void AActor::GetComponents ( TSubclassOf< UActorComponent >  ComponentClass,
TArray< UActorComponent *, AllocatorType > &  OutComponents,
bool  bIncludeFromChildActors = false 
) const
inline

Get all components derived from specified ComponentClass and fill in the OutComponents array with the result.

It's recommended to use TArrays with a TInlineAllocator to potentially avoid memory allocation costs. TInlineComponentArray is defined to make this easier, for example: { TInlineComponentArray<UPrimitiveComponent*> PrimComponents(Actor); }

参数
ComponentClassThe component class to find all components of a class derived from
bIncludeFromChildActorsIf true then recurse in to ChildActor components and find components of the appropriate type in those Actors as well

◆ GetComponentsBoundingBox()

virtual FBox AActor::GetComponentsBoundingBox ( bool  bNonColliding = false,
bool  bIncludeFromChildActors = false 
) const
virtual

Returns the world space bounding box of all components in this Actor.

参数
bNonCollidingIndicates that you want to include non-colliding components in the bounding box
bIncludeFromChildActorsIf true then recurse in to ChildActor components and find components of the appropriate type in those Actors as well

被 ALODActor 重载.

◆ GetComponentsBoundingCylinder()

virtual void AActor::GetComponentsBoundingCylinder ( float &  CollisionRadius,
float &  CollisionHalfHeight,
bool  bNonColliding = false,
bool  bIncludeFromChildActors = false 
) const
virtual

Get half-height/radius of a big axis-aligned cylinder around this actors registered colliding components, or all registered components if bNonColliding is false.

参数
bNonCollidingIndicates that you want to include non-colliding components in the bounding cylinder
bIncludeFromChildActorsIf true then recurse in to ChildActor components and find components of the appropriate type in those Actors as well

◆ GetComponentsCollisionResponseToChannel()

virtual ECollisionResponse AActor::GetComponentsCollisionResponseToChannel ( ECollisionChannel  Channel) const
virtual

Get Collision Response to the passed in Channel for all components It returns Max of state - i.e.

if Component A overlaps, but if Component B blocks, it will return block as response if Component A ignores, but if Component B overlaps, it will return overlap

◆ GetDefaultAttachComponent()

virtual USceneComponent * AActor::GetDefaultAttachComponent ( ) const
inlinevirtual

Returns this actor's default attachment component for attaching children to

返回
The scene component to be used as parent

被 ACameraRig_Crane , 以及 ACameraActor 重载.

◆ GetDotProductTo()

float AActor::GetDotProductTo ( const AActor *  OtherActor) const

Returns the dot product from this Actor to OtherActor.

Returns -2.0 on failure. Returns 0.0 for coincidental actors.

◆ GetFunctionCallspace()

virtual int32 AActor::GetFunctionCallspace ( UFunction *  Function,
FFrame *  Stack 
)
overridevirtual

Return the space this function should be called.

Checks to see if this function should be called locally, remotely, or simply absorbed under the given conditions

参数
Functionfunction to call
Stackstack frame for the function call
返回
bitmask representing all callspaces that apply to this UFunction in the given context

重载 UObject .

◆ GetGameInstance()

template<class T >
T * AActor::GetGameInstance ( ) const
inline

Gets the GameInstance that ultimately contains this actor cast to the template type.

May return NULL if the cast fails.

◆ GetHiddenPropertyName()

static const FName AActor::GetHiddenPropertyName ( )
inlinestatic

Gets the property name for bHidden.

This exists so subclasses don't need to have direct access to the bHidden property so it can be made private later.

◆ GetHorizontalDotProductTo()

float AActor::GetHorizontalDotProductTo ( const AActor *  OtherActor) const

Returns the dot product from this Actor to OtherActor, ignoring Z.

Returns -2.0 on failure. Returns 0.0 for coincidental actors.

◆ GetInstigator()

template<class T >
T * AActor::GetInstigator ( ) const
inline

Get the instigator, cast as a specific class.

返回
The instigator for this actor if it is the specified type, nullptr otherwise.

◆ GetInstigatorController()

template<class T >
T * AActor::GetInstigatorController ( ) const
inline

Returns the instigator's controller, cast as a specific class.

返回
The instigator's controller for this actor if it is the specified type, nullptr otherwise.

◆ GetInstigatorPropertyName()

static const FName AActor::GetInstigatorPropertyName ( )
inlinestatic

Gets the property name for Instigator.

This exists so subclasses don't need to have direct access to the Instigator property so it can be made private later.

◆ GetLifeSpan()

virtual float AActor::GetLifeSpan ( ) const
virtual

Get the remaining lifespan of this actor.

If zero is returned the actor lives forever.

◆ GetNetConnection()

virtual class UNetConnection * AActor::GetNetConnection ( ) const
virtual

Get the owning connection used for communicating between client/server

返回
NetConnection to the client or server for this actor

被 APawn , 以及 APlayerController 重载.

◆ GetNetDormancy()

virtual bool AActor::GetNetDormancy ( const FVector &  ViewPos,
const FVector &  ViewDir,
class AActor *  Viewer,
AActor *  ViewTarget,
UActorChannel *  InChannel,
float  Time,
bool  bLowBandwidth 
)
virtual

Returns true if the actor should be dormant for a specific net connection.

Only checked for DORM_DormantPartial

◆ GetNetMode()

FORCEINLINE_DEBUGGABLE ENetMode AActor::GetNetMode ( ) const

Get the network mode (dedicated server, client, standalone, etc) for this actor.

参见
IsNetMode()

◆ GetNetOwner()

FORCEINLINE_DEBUGGABLE const AActor * AActor::GetNetOwner ( ) const
virtual

Return the actor responsible for replication, if any.

Typically the player controller

被 APawn , 以及 APlayerController 重载.

◆ GetNetOwningPlayer()

virtual class UPlayer * AActor::GetNetOwningPlayer ( )
virtual

Return the owning UPlayer (if any) of this actor.

This will be a local player, a net connection, or nullptr.

被 APawn , 以及 APlayerController 重载.

◆ GetNetPriority()

virtual float AActor::GetNetPriority ( const FVector &  ViewPos,
const FVector &  ViewDir,
class AActor *  Viewer,
AActor *  ViewTarget,
UActorChannel *  InChannel,
float  Time,
bool  bLowBandwidth 
)
virtual

Function used to prioritize actors when deciding which to replicate

参数
ViewPosPosition of the viewer
ViewDirVector direction of viewer
Viewer"net object" owned by the client for whom net priority is being determined (typically player controller)
ViewTargetThe actor that is currently being viewed/controlled by Viewer, usually a pawn
InChannelChannel on which this actor is being replicated.
TimeTime since actor was last replicated
bLowBandwidthTrue if low bandwidth of viewer
返回
Priority of this actor for replication, higher is more important

被 APlayerController 重载.

◆ GetOverlappingActors() [1/2]

void AActor::GetOverlappingActors ( TArray< AActor * > &  OverlappingActors,
TSubclassOf< AActor >  ClassFilter = nullptr 
) const

Returns list of actors this actor is overlapping (any component overlapping any component).

Does not return itself.

参数
OverlappingActors[out] Returned list of overlapping actors
ClassFilter[optional] If set, only returns actors of this class or subclasses

◆ GetOverlappingActors() [2/2]

void AActor::GetOverlappingActors ( TSet< AActor * > &  OverlappingActors,
TSubclassOf< AActor >  ClassFilter = nullptr 
) const

Returns set of actors this actor is overlapping (any component overlapping any component).

Does not return itself.

参数
OverlappingActors[out] Returned list of overlapping actors
ClassFilter[optional] If set, only returns actors of this class or subclasses

◆ GetReplayPriority()

virtual float AActor::GetReplayPriority ( const FVector &  ViewPos,
const FVector &  ViewDir,
class AActor *  Viewer,
AActor *  ViewTarget,
UActorChannel *const  InChannel,
float  Time 
)
virtual

Similar to GetNetPriority, but will only be used for prioritizing actors while recording a replay.

参数
ViewPosPosition of the viewer
ViewDirVector direction of viewer
Viewer"net object" owned by the client for whom net priority is being determined (typically player controller)
ViewTargetThe actor that is currently being viewed/controlled by Viewer, usually a pawn
InChannelChannel on which this actor is being replicated.
TimeTime since actor was last replicated
返回
Priority of this actor for replays, higher is more important

◆ GetReplicatedMovement()

const FRepMovement & AActor::GetReplicatedMovement ( ) const
inline

Gets the literal value of ReplicatedMovement.

This exists so subclasses don't need to have direct access to the Role property so it can be made private later.

◆ GetReplicatedMovement_Mutable()

FRepMovement & AActor::GetReplicatedMovement_Mutable ( )

Gets a reference to ReplicatedMovement with the expectation that it will be modified.

This exists so subclasses don't need to have direct access to the ReplicatedMovement property so it can be made private later.

◆ GetReplicateMovementPropertyName()

static const FName AActor::GetReplicateMovementPropertyName ( )
inlinestatic

Gets the property name for bReplicateMovement.

This exists so subclasses don't need to have direct access to the bReplicateMovement property so it can be made private later.

◆ GetRolePropertyName()

static const FName AActor::GetRolePropertyName ( )
inlinestatic

Gets the property name for Role.

This exists so subclasses don't need to have direct access to the Role property so it can be made private later.

◆ GetSimpleCollisionCylinder()

virtual void AActor::GetSimpleCollisionCylinder ( float &  CollisionRadius,
float &  CollisionHalfHeight 
) const
virtual

Get axis-aligned cylinder around this actor, used for simple collision checks (ie Pawns reaching a destination).

If IsRootComponentCollisionRegistered() returns true, just returns its bounding cylinder, otherwise falls back to GetComponentsBoundingCylinder.

被 ACharacter 重载.

◆ GetTargetLocation()

virtual FVector AActor::GetTargetLocation ( AActor *  RequestedBy = nullptr) const
virtual

Returns the optimal location to fire weapons at this actor

参数
RequestedBy- the Actor requesting the target location

◆ GetTransform()

const FTransform & AActor::GetTransform ( ) const
inline

Get the actor-to-world transform.

返回
The transform that transforms from actor space to world space.

◆ GetUpdateOverlapsMethodDuringLevelStreaming()

EActorUpdateOverlapsMethod AActor::GetUpdateOverlapsMethodDuringLevelStreaming ( ) const

Get the method used to UpdateOverlaps() when loaded via level streaming.

Resolves the 'UseConfigDefault' option to the class default specified in config.

◆ HasDeferredComponentRegistration()

FORCEINLINE bool AActor::HasDeferredComponentRegistration ( ) const
inline

Returns true if Actor has deferred the RegisterAllComponents() call at spawn time (e.g.

pending Blueprint SCS execution to set up a scene root component).

◆ HasLocalNetOwner()

virtual bool AActor::HasLocalNetOwner ( ) const
virtual

Does this actor have a locally controlled owner responsible for replication? (APlayerController typically)

返回
true if this actor can call RPCs or false if no such owner chain exists

◆ HasNetOwner()

virtual bool AActor::HasNetOwner ( ) const
virtual

Does this actor have an owner responsible for replication? (APlayerController typically)

返回
true if this actor can call RPCs or false if no such owner chain exists

被 APlayerController 重载.

◆ IncrementalRegisterComponents()

bool AActor::IncrementalRegisterComponents ( int32  NumComponentsToRegister,
FRegisterComponentContext *  Context = nullptr 
)

Incrementally registers components associated with this actor, used during level streaming

参数
NumComponentsToRegisterNumber of components to register in this run, 0 for all
返回
true when all components were registered for this actor

◆ IsAttachedTo()

virtual bool AActor::IsAttachedTo ( const AActor *  Other) const
virtual

Iterates up the attachment chain to see whether or not this Actor is attached to the given Actor

参数
Otherthe Actor to test for
返回
true if this Actor is attached on Other Actor

◆ IsBasedOnActor()

virtual bool AActor::IsBasedOnActor ( const AActor *  Other) const
virtual

Iterates up the movement base chain to see whether or not this Actor is based on the given Actor, defaults to checking attachment

参数
Otherthe Actor to test for
返回
true if this Actor is based on Other Actor

被 APawn 重载.

◆ IsComponentRelevantForNavigation()

virtual bool AActor::IsComponentRelevantForNavigation ( UActorComponent *  Component) const
inlinevirtual

Check if owned component should be relevant for navigation Allows implementing master switch to disable e.g.

collision export in projectiles

◆ IsEditorOnly()

virtual bool AActor::IsEditorOnly ( ) const
overridevirtual

Called during saving to determine if the object is forced to be editor only or not

返回
true if this object should never be loaded outside the editor

重载 UObject .

◆ IsHidden()

bool AActor::IsHidden ( ) const
inline

Gets the literal value of bHidden.

This exists so subclasses don't need to have direct access to the bHidden property so it can be made private later.

◆ IsInPersistentLevel()

bool AActor::IsInPersistentLevel ( bool  bIncludeLevelStreamingPersistent = false) const

Returns whether this Actor is in the persistent level, i.e.

not a sublevel

◆ IsNetMode()

FORCEINLINE_DEBUGGABLE bool AActor::IsNetMode ( ENetMode  Mode) const

Test whether net mode is the given mode.

In optimized non-editor builds this can be more efficient than GetNetMode() because it can check the static build flags without considering PIE.

◆ IsNetRelevantFor()

virtual bool AActor::IsNetRelevantFor ( const AActor *  RealViewer,
const AActor *  ViewTarget,
const FVector &  SrcLocation 
) const
virtual

Checks to see if this actor is relevant for a specific network connection

参数
RealViewer- is the "controlling net object" associated with the client for which network relevancy is being checked (typically player controller)
ViewTarget- is the Actor being used as the point of view for the RealViewer
SrcLocation- is the viewing location
返回
bool - true if this actor is network relevant to the client associated with RealViewer

被 APawn , 以及 APlayerController 重载.

◆ IsOverlappingActor()

bool AActor::IsOverlappingActor ( const AActor *  Other) const

Check whether any component of this Actor is overlapping any component of another Actor.

参数
OtherThe other Actor to test against
返回
Whether any component of this Actor is overlapping any component of another Actor.

◆ IsPackageExternal()

bool AActor::IsPackageExternal ( ) const
inline

Get the actor packaging mode.

返回
true if the actor is packaged in an external package different than its level package

◆ IsPendingKillPending()

bool AActor::IsPendingKillPending ( ) const
inline

Returns true if this actor has begun the destruction process.

This is set to true in UWorld::DestroyActor, after the network connection has been closed but before any other shutdown has been performed.

返回
true if this actor has begun destruction, or if this actor has been destroyed already.

◆ IsReadyForFinishDestroy()

virtual bool AActor::IsReadyForFinishDestroy ( )
overridevirtual

Called to check if the object is ready for FinishDestroy.

This is called after BeginDestroy to check the completion of the potentially asynchronous object cleanup.

返回
True if the object's asynchronous cleanup has completed and it is ready for FinishDestroy to be called.

重载 UObject .

◆ IsRelevancyOwnerFor()

virtual bool AActor::IsRelevancyOwnerFor ( const AActor *  ReplicatedActor,
const AActor *  ActorOwner,
const AActor *  ConnectionActor 
) const
virtual

Check if this actor is the owner when doing relevancy checks for actors marked bOnlyRelevantToOwner

参数
ReplicatedActor- the actor we're doing a relevancy test on
ActorOwner- the owner of ReplicatedActor
ConnectionActor- the controller of the connection that we're doing relevancy checks for
返回
bool - true if this actor should be considered the owner

◆ IsReplayRelevantFor()

virtual bool AActor::IsReplayRelevantFor ( const AActor *  RealViewer,
const AActor *  ViewTarget,
const FVector &  SrcLocation,
const float  CullDistanceSquared 
) const
virtual

Checks to see if this actor is relevant for a recorded replay

参数
RealViewer- is the "controlling net object" associated with the client for which network relevancy is being checked (typically player controller)
ViewTarget- is the Actor being used as the point of view for the RealViewer
SrcLocation- is the viewing location
返回
bool - true if this actor is replay relevant to the client associated with RealViewer

◆ IsReplicatingMovement()

bool AActor::IsReplicatingMovement ( ) const
inline

Gets the literal value of bReplicateMovement.

This exists so subclasses don't need to have direct access to the bReplicateMovement property so it can be made private later.

◆ IsRootComponentCollisionRegistered()

virtual bool AActor::IsRootComponentCollisionRegistered ( ) const
virtual

Returns true if the root component is registered and has collision enabled.


◆ IsWithinNetRelevancyDistance()

bool AActor::IsWithinNetRelevancyDistance ( const FVector &  SrcLocation) const
protected

Determines whether or not the distance between the given SrcLocation and the Actor's location is within the net relevancy distance.

Actors outside relevancy distance may not be replicated.

参数
SrcLocationLocation to test against.
返回
True if the actor is within net relevancy distance, false otherwise.

◆ K2_AddActorLocalOffset()

void AActor::K2_AddActorLocalOffset ( FVector  DeltaLocation,
bool  bSweep,
FHitResult &  SweepHitResult,
bool  bTeleport 
)

Adds a delta to the location of this component in its local reference frame.

参数
DelatLocationThe change in location in local space.
bSweepWhether we sweep to the destination location, triggering overlaps along the way and stopping short of the target if blocked by something. Only the root component is swept and checked for blocking collision, child components move without sweeping. If collision is off, this has no effect.
bTeleportWhether we teleport the physics state (if physics collision is enabled for this object). If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location). If false, physics velocity is updated based on the change in position (affecting ragdoll parts). If CCD is on and not teleporting, this will affect objects along the entire swept volume.

◆ K2_AddActorLocalRotation()

void AActor::K2_AddActorLocalRotation ( FRotator  DeltaRotation,
bool  bSweep,
FHitResult &  SweepHitResult,
bool  bTeleport 
)

Adds a delta to the rotation of this component in its local reference frame

参数
DeltaRotationThe change in rotation in local space.
bSweepWhether we sweep to the destination location, triggering overlaps along the way and stopping short of the target if blocked by something. Only the root component is swept and checked for blocking collision, child components move without sweeping. If collision is off, this has no effect.
bTeleportWhether we teleport the physics state (if physics collision is enabled for this object). If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location). If false, physics velocity is updated based on the change in position (affecting ragdoll parts). If CCD is on and not teleporting, this will affect objects along the entire swept volume.

◆ K2_AddActorLocalTransform()

void AActor::K2_AddActorLocalTransform ( const FTransform &  NewTransform,
bool  bSweep,
FHitResult &  SweepHitResult,
bool  bTeleport 
)

Adds a delta to the transform of this component in its local reference frame

参数
NewTransformThe change in transform in local space.
bSweepWhether we sweep to the destination location, triggering overlaps along the way and stopping short of the target if blocked by something. Only the root component is swept and checked for blocking collision, child components move without sweeping. If collision is off, this has no effect.
bTeleportWhether we teleport the physics state (if physics collision is enabled for this object). If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location). If false, physics velocity is updated based on the change in position (affecting ragdoll parts). If CCD is on and not teleporting, this will affect objects along the entire swept volume.

◆ K2_AddActorWorldOffset()

void AActor::K2_AddActorWorldOffset ( FVector  DeltaLocation,
bool  bSweep,
FHitResult &  SweepHitResult,
bool  bTeleport 
)

Adds a delta to the location of this actor in world space.

参数
DeltaLocationThe change in location.
bSweepWhether we sweep to the destination location, triggering overlaps along the way and stopping short of the target if blocked by something. Only the root component is swept and checked for blocking collision, child components move without sweeping. If collision is off, this has no effect.
bTeleportWhether we teleport the physics state (if physics collision is enabled for this object). If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location). If false, physics velocity is updated based on the change in position (affecting ragdoll parts). If CCD is on and not teleporting, this will affect objects along the entire swept volume.
SweepHitResultThe hit result from the move if swept.

◆ K2_AddActorWorldRotation()

void AActor::K2_AddActorWorldRotation ( FRotator  DeltaRotation,
bool  bSweep,
FHitResult &  SweepHitResult,
bool  bTeleport 
)

Adds a delta to the rotation of this actor in world space.

参数
DeltaRotationThe change in rotation.
bSweepWhether to sweep to the target rotation (not currently supported for rotation).
bTeleportWhether we teleport the physics state (if physics collision is enabled for this object). If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location). If false, physics velocity is updated based on the change in position (affecting ragdoll parts). If CCD is on and not teleporting, this will affect objects along the entire swept volume.
SweepHitResultThe hit result from the move if swept.

◆ K2_AddActorWorldTransform()

void AActor::K2_AddActorWorldTransform ( const FTransform &  DeltaTransform,
bool  bSweep,
FHitResult &  SweepHitResult,
bool  bTeleport 
)

Adds a delta to the transform of this actor in world space.

Ignores scale and sets it to (1,1,1).

◆ K2_AddActorWorldTransformKeepScale()

void AActor::K2_AddActorWorldTransformKeepScale ( const FTransform &  DeltaTransform,
bool  bSweep,
FHitResult &  SweepHitResult,
bool  bTeleport 
)

Adds a delta to the transform of this actor in world space.

Scale is unchanged.

◆ K2_AttachToActor()

void AActor::K2_AttachToActor ( AActor *  ParentActor,
FName  SocketName,
EAttachmentRule  LocationRule,
EAttachmentRule  RotationRule,
EAttachmentRule  ScaleRule,
bool  bWeldSimulatedBodies 
)

Attaches the RootComponent of this Actor to the supplied actor, optionally at a named socket.

参数
ParentActorActor to attach this actor's RootComponent to
SocketNameSocket name to attach to, if any
LocationRuleHow to handle translation when attaching.
RotationRuleHow to handle rotation when attaching.
ScaleRuleHow to handle scale when attaching.
bWeldSimulatedBodiesWhether to weld together simulated physics bodies.

◆ K2_AttachToComponent()

void AActor::K2_AttachToComponent ( USceneComponent *  Parent,
FName  SocketName,
EAttachmentRule  LocationRule,
EAttachmentRule  RotationRule,
EAttachmentRule  ScaleRule,
bool  bWeldSimulatedBodies 
)

Attaches the RootComponent of this Actor to the supplied component, optionally at a named socket.

It is not valid to call this on components that are not Registered.

参数
ParentParent to attach to.
SocketNameOptional socket to attach to on the parent.
LocationRuleHow to handle translation when attaching.
RotationRuleHow to handle rotation when attaching.
ScaleRuleHow to handle scale when attaching.
bWeldSimulatedBodiesWhether to weld together simulated physics bodies.

◆ K2_DetachFromActor()

void AActor::K2_DetachFromActor ( EDetachmentRule  LocationRule = EDetachmentRule::KeepRelative,
EDetachmentRule  RotationRule = EDetachmentRule::KeepRelative,
EDetachmentRule  ScaleRule = EDetachmentRule::KeepRelative 
)

Detaches the RootComponent of this Actor from any SceneComponent it is currently attached to.

参数
LocationRuleHow to handle translation when detaching.
RotationRuleHow to handle rotation when detaching.
ScaleRuleHow to handle scale when detaching.

◆ K2_GetComponentsByClass()

TArray< UActorComponent * > AActor::K2_GetComponentsByClass ( TSubclassOf< UActorComponent >  ComponentClass) const

Gets all the components that inherit from the given class.

Currently returns an array of UActorComponent which must be cast to the correct type. This intended to only be used by blueprints. Use GetComponents() in C++.

◆ K2_SetActorLocation()

bool AActor::K2_SetActorLocation ( FVector  NewLocation,
bool  bSweep,
FHitResult &  SweepHitResult,
bool  bTeleport 
)

Move the Actor to the specified location.

参数
NewLocationThe new location to move the Actor to.
bSweepWhether we sweep to the destination location, triggering overlaps along the way and stopping short of the target if blocked by something. Only the root component is swept and checked for blocking collision, child components move without sweeping. If collision is off, this has no effect.
bTeleportWhether we teleport the physics state (if physics collision is enabled for this object). If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location). If false, physics velocity is updated based on the change in position (affecting ragdoll parts). If CCD is on and not teleporting, this will affect objects along the entire swept volume.
SweepHitResultThe hit result from the move if swept.
返回
Whether the location was successfully set (if not swept), or whether movement occurred at all (if swept).

◆ K2_SetActorLocationAndRotation()

bool AActor::K2_SetActorLocationAndRotation ( FVector  NewLocation,
FRotator  NewRotation,
bool  bSweep,
FHitResult &  SweepHitResult,
bool  bTeleport 
)

Move the actor instantly to the specified location and rotation.

参数
NewLocationThe new location to teleport the Actor to.
NewRotationThe new rotation for the Actor.
bSweepWhether we sweep to the destination location, triggering overlaps along the way and stopping short of the target if blocked by something. Only the root component is swept and checked for blocking collision, child components move without sweeping. If collision is off, this has no effect.
bTeleportWhether we teleport the physics state (if physics collision is enabled for this object). If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location). If false, physics velocity is updated based on the change in position (affecting ragdoll parts). If CCD is on and not teleporting, this will affect objects along the entire swept volume.
SweepHitResultThe hit result from the move if swept.
返回
Whether the rotation was successfully set.

◆ K2_SetActorRelativeLocation()

void AActor::K2_SetActorRelativeLocation ( FVector  NewRelativeLocation,
bool  bSweep,
FHitResult &  SweepHitResult,
bool  bTeleport 
)

Set the actor's RootComponent to the specified relative location.

参数
NewRelativeLocationNew relative location of the actor's root component
bSweepWhether we sweep to the destination location, triggering overlaps along the way and stopping short of the target if blocked by something. Only the root component is swept and checked for blocking collision, child components move without sweeping. If collision is off, this has no effect.
bTeleportWhether we teleport the physics state (if physics collision is enabled for this object). If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location). If false, physics velocity is updated based on the change in position (affecting ragdoll parts). If CCD is on and not teleporting, this will affect objects along the entire swept volume.

◆ K2_SetActorRelativeRotation()

void AActor::K2_SetActorRelativeRotation ( FRotator  NewRelativeRotation,
bool  bSweep,
FHitResult &  SweepHitResult,
bool  bTeleport 
)

Set the actor's RootComponent to the specified relative rotation

参数
NewRelativeRotationNew relative rotation of the actor's root component
bSweepWhether we sweep to the destination location, triggering overlaps along the way and stopping short of the target if blocked by something. Only the root component is swept and checked for blocking collision, child components move without sweeping. If collision is off, this has no effect.
bTeleportWhether we teleport the physics state (if physics collision is enabled for this object). If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location). If false, physics velocity is updated based on the change in position (affecting ragdoll parts). If CCD is on and not teleporting, this will affect objects along the entire swept volume.

◆ K2_SetActorRelativeTransform()

void AActor::K2_SetActorRelativeTransform ( const FTransform &  NewRelativeTransform,
bool  bSweep,
FHitResult &  SweepHitResult,
bool  bTeleport 
)

Set the actor's RootComponent to the specified relative transform

参数
NewRelativeTransformNew relative transform of the actor's root component
bSweepWhether we sweep to the destination location, triggering overlaps along the way and stopping short of the target if blocked by something. Only the root component is swept and checked for blocking collision, child components move without sweeping. If collision is off, this has no effect.
bTeleportWhether we teleport the physics state (if physics collision is enabled for this object). If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location). If false, physics velocity is updated based on the change in position (affecting ragdoll parts). If CCD is on and not teleporting, this will affect objects along the entire swept volume.

◆ K2_SetActorRotation()

bool AActor::K2_SetActorRotation ( FRotator  NewRotation,
bool  bTeleportPhysics 
)

Set the Actor's rotation instantly to the specified rotation.

参数
NewRotationThe new rotation for the Actor.
bTeleportPhysicsWhether we teleport the physics state (if physics collision is enabled for this object). If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location). If false, physics velocity is updated based on the change in position (affecting ragdoll parts).
返回
Whether the rotation was successfully set.

◆ K2_SetActorTransform()

bool AActor::K2_SetActorTransform ( const FTransform &  NewTransform,
bool  bSweep,
FHitResult &  SweepHitResult,
bool  bTeleport 
)

Set the Actors transform to the specified one.

参数
NewTransformThe new transform.
bSweepWhether we sweep to the destination location, triggering overlaps along the way and stopping short of the target if blocked by something. Only the root component is swept and checked for blocking collision, child components move without sweeping. If collision is off, this has no effect.
bTeleportWhether we teleport the physics state (if physics collision is enabled for this object). If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location). If false, physics velocity is updated based on the change in position (affecting ragdoll parts). If CCD is on and not teleporting, this will affect objects along the entire swept volume.

◆ K2_TeleportTo()

bool AActor::K2_TeleportTo ( FVector  DestLocation,
FRotator  DestRotation 
)

Teleport this actor to a new location.

If the actor doesn't fit exactly at the location specified, tries to slightly move it out of walls and such.

参数
DestLocationThe target destination point
DestRotationThe target rotation at the destination
返回
true if the actor has been successfully moved, or false if it couldn't fit.

◆ MakeNoise()

void AActor::MakeNoise ( float  Loudness = 1.f,
APawn *  NoiseInstigator = nullptr,
FVector  NoiseLocation = FVector::ZeroVector,
float  MaxRange = 0.f,
FName  Tag = NAME_None 
)

Trigger a noise caused by a given Pawn, at a given location.

Note that the NoiseInstigator Pawn MUST have a PawnNoiseEmitterComponent for the noise to be detected by a PawnSensingComponent. Senders of MakeNoise should have an Instigator if they are not pawns, or pass a NoiseInstigator.

参数
LoudnessThe relative loudness of this noise. Usual range is 0 (no noise) to 1 (full volume). If MaxRange is used, this scales the max range, otherwise it affects the hearing range specified by the sensor.
NoiseInstigatorPawn responsible for this noise. Uses the actor's Instigator if NoiseInstigator is null
NoiseLocationPosition of noise source. If zero vector, use the actor's location.
MaxRangeMax range at which the sound may be heard. A value of 0 indicates no max range (though perception may have its own range). Loudness scales the range. (Note: not supported for legacy PawnSensingComponent, only for AIPerception)
TagIdentifier for the noise.

◆ NotifyActorBeginOverlap()

virtual void AActor::NotifyActorBeginOverlap ( AActor *  OtherActor)
virtual

Event when this actor overlaps another actor, for example a player walking into a trigger.

For events when objects have a blocking collision, for example a player hitting a wall, see 'Hit' events.

注解
Components on both this and the other Actor must have bGenerateOverlapEvents set to true to generate overlap events.

被 ACharacter 重载.

◆ NotifyActorEndOverlap()

virtual void AActor::NotifyActorEndOverlap ( AActor *  OtherActor)
virtual

Event when an actor no longer overlaps another actor, and they have separated.

注解
Components on both this and the other Actor must have bGenerateOverlapEvents set to true to generate overlap events.

被 ACharacter 重载.

◆ NotifyHit()

virtual void AActor::NotifyHit ( class UPrimitiveComponent *  MyComp,
AActor *  Other,
class UPrimitiveComponent *  OtherComp,
bool  bSelfMoved,
FVector  HitLocation,
FVector  HitNormal,
FVector  NormalImpulse,
const FHitResult &  Hit 
)
virtual

Event when this actor bumps into a blocking object, or blocks another actor that bumps into it.

This could happen due to things like Character movement, using Set Location with 'sweep' enabled, or physics simulation. For events when objects overlap (e.g. walking into a trigger) see the 'Overlap' event.

注解
For collisions during physics simulation to generate hit events, 'Simulation Generates Hit Events' must be enabled.
When receiving a hit from another object's movement (bSelfMoved is false), the directions of 'Hit.Normal' and 'Hit.ImpactNormal' will be adjusted to indicate force from the other object against this object.

◆ OnActorChannelOpen()

virtual void AActor::OnActorChannelOpen ( class FInBunch &  InBunch,
class UNetConnection *  Connection 
)
inlinevirtual

Allows for a specific response from the actor when the actor channel is opened (client side)

参数
InBunchBunch received at time of open
Connectionthe connection associated with this actor

被 APlayerController 重载.

◆ OnConstruction()

virtual void AActor::OnConstruction ( const FTransform &  Transform)
inlinevirtual

Called when an instance of this class is placed (in editor) or spawned.

参数
TransformThe transform the actor was constructed at.

被 AFieldSystemActor 重载.

◆ OnNetCleanup()

virtual void AActor::OnNetCleanup ( class UNetConnection *  Connection)
inlinevirtual

Handles cleaning up the associated Actor when killing the connection

参数
Connectionthe connection associated with this actor

被 APlayerController 重载.

◆ OnSerializeNewActor()

virtual void AActor::OnSerializeNewActor ( class FOutBunch &  OutBunch)
inlinevirtual

SerializeNewActor has just been called on the actor before network replication (server side)

参数
OutBunchBunch containing serialized contents of actor prior to replication

被 APlayerController 重载.

◆ PostActorConstruction()

void AActor::PostActorConstruction ( )

Called after the actor has run its construction.

Responsible for finishing the actor spawn process.

◆ PostActorCreated()

virtual void AActor::PostActorCreated ( )
virtual

Called when an actor is done spawning into the world (from UWorld::SpawnActor), both in the editor and during gameplay For actors with a root component, the location and rotation will have already been set.

This is called before calling construction scripts, but after native components have been created

◆ PostInitProperties()

virtual void AActor::PostInitProperties ( )
overridevirtual

Called after the C++ constructor and after the properties have been initialized, including those loaded from config.

This is called before any serialization or other setup has happened.

重载 UObject .

被 AWorldSettings, ALevelSequenceActor , 以及 ANavigationData 重载.

◆ PostLoad()

virtual void AActor::PostLoad ( )
overridevirtual

Do any object-specific cleanup required immediately after loading an object.

This is not called for newly-created objects, and by default will always execute on the game thread.

重载 UObject .

被 AEQSTestingPawn, ADecalActor, ADirectionalLight, ALODActor, ASceneCapture, APawn, APlayerController, AWorldSettings, AGeometryCollectionDebugDrawActor, ALevelSequenceActor , 以及 ANavigationData 重载.

◆ PostLoadSubobjects()

virtual void AActor::PostLoadSubobjects ( FObjectInstancingGraph *  OuterInstanceGraph)
overridevirtual

Instances components for objects being loaded from disk, if necessary.

Ensures that component references between nested components are fixed up correctly.

参数
OuterInstanceGraphwhen calling this method on subobjects, specifies the instancing graph which contains all instanced subobjects and components for a subobject root.

重载 UObject .

◆ PostNetReceiveLocationAndRotation()

virtual void AActor::PostNetReceiveLocationAndRotation ( )
virtual

Update location and rotation from ReplicatedMovement.

Not called for simulated physics!

被 ACharacter , 以及 APawn 重载.

◆ PostRenderFor()

virtual void AActor::PostRenderFor ( class APlayerController *  PC,
class UCanvas *  Canvas,
FVector  CameraPosition,
FVector  CameraDir 
)
virtual

Hook to allow actors to render HUD overlays for themselves.

Called from AHUD::DrawActorOverlays().

参数
PCis the PlayerController on whose view this overlay is rendered
Canvasis the Canvas on which to draw the overlay
CameraPositionPosition of Camera
CameraDirdirection camera is pointing in.

◆ PostSaveRoot()

virtual void AActor::PostSaveRoot ( bool  bCleanupIsRequired)
overridevirtual

Called from within SavePackage on the passed in base/root object.

This function is called after the package has been saved and can perform cleanup.

参数
bCleanupIsRequiredWhether PreSaveRoot dirtied state that needs to be cleaned up

重载 UObject .

◆ PostSpawnInitialize()

void AActor::PostSpawnInitialize ( FTransform const &  SpawnTransform,
AActor *  InOwner,
APawn *  InInstigator,
bool  bRemoteOwned,
bool  bNoFail,
bool  bDeferConstruction 
)

Called after the actor is spawned in the world.

Responsible for setting up actor for play.

◆ PreReplication()

virtual void AActor::PreReplication ( IRepChangedPropertyTracker &  ChangedPropertyTracker)
virtual

Called on the actor right before replication occurs.

Only called on Server, and for autonomous proxies if recording a Client Replay.

被 ACharacter , 以及 APawn 重载.

◆ PreReplicationForReplay()

virtual void AActor::PreReplicationForReplay ( IRepChangedPropertyTracker &  ChangedPropertyTracker)
virtual

Called on the actor right before replication occurs.

Called for everyone when recording a Client Replay, including Simulated Proxies.

被 ACharacter 重载.

◆ PreSaveRoot()

virtual bool AActor::PreSaveRoot ( const TCHAR *  Filename)
overridevirtual

Called from within SavePackage on the passed in base/root object.

The return value of this function will be passed to PostSaveRoot. This is used to allow objects used as a base to perform required actions before saving and cleanup afterwards.

参数
FilenameName of the file being saved to (includes path)
返回
Whether PostSaveRoot needs to perform internal cleanup

重载 UObject .

◆ PrestreamTextures()

virtual void AActor::PrestreamTextures ( float  Seconds,
bool  bEnableStreaming,
int32  CinematicTextureGroups = 0 
)
virtual

Calls PrestreamTextures() for all the actor's meshcomponents.

参数
Seconds- Number of seconds to force all mip-levels to be resident
bEnableStreaming- Whether to start (true) or stop (false) streaming
CinematicTextureGroups- Bitfield indicating which texture groups that use extra high-resolution mips

◆ ReceiveActorBeginOverlap()

void AActor::ReceiveActorBeginOverlap ( AActor *  OtherActor)

Event when this actor overlaps another actor, for example a player walking into a trigger.

For events when objects have a blocking collision, for example a player hitting a wall, see 'Hit' events.

注解
Components on both this and the other Actor must have bGenerateOverlapEvents set to true to generate overlap events.

◆ ReceiveActorEndOverlap()

void AActor::ReceiveActorEndOverlap ( AActor *  OtherActor)

Event when an actor no longer overlaps another actor, and they have separated.

注解
Components on both this and the other Actor must have bGenerateOverlapEvents set to true to generate overlap events.

◆ ReceiveHit()

void AActor::ReceiveHit ( class UPrimitiveComponent *  MyComp,
AActor *  Other,
class UPrimitiveComponent *  OtherComp,
bool  bSelfMoved,
FVector  HitLocation,
FVector  HitNormal,
FVector  NormalImpulse,
const FHitResult &  Hit 
)

Event when this actor bumps into a blocking object, or blocks another actor that bumps into it.

This could happen due to things like Character movement, using Set Location with 'sweep' enabled, or physics simulation. For events when objects overlap (e.g. walking into a trigger) see the 'Overlap' event.

注解
For collisions during physics simulation to generate hit events, 'Simulation Generates Hit Events' must be enabled.
When receiving a hit from another object's movement (bSelfMoved is false), the directions of 'Hit.Normal' and 'Hit.ImpactNormal' will be adjusted to indicate force from the other object against this object.
NormalImpulse will be filled in for physics-simulating bodies, but will be zero for swept-component blocking collisions.

◆ RegisterActorTickFunctions()

virtual void AActor::RegisterActorTickFunctions ( bool  bRegister)
protectedvirtual

Virtual call chain to register all tick functions for the actor class hierarchy

参数
bRegister- true to register, false, to unregister

◆ RegisterAllActorTickFunctions()

void AActor::RegisterAllActorTickFunctions ( bool  bRegister,
bool  bDoComponents 
)

When called, will call the virtual call chain to register all of the tick functions for both the actor and optionally all components Do not override this function or make it virtual

参数
bRegister- true to register, false, to unregister
bDoComponents- true to also apply the change to all components

◆ RemoveControllingMatineeActor()

void AActor::RemoveControllingMatineeActor ( AMatineeActor &  InMatineeActor)

Removes a controlling matinee actor

参数
InMatineeActorThe matinee actor which currently controls this actor

◆ RemoveOwnedComponent()

void AActor::RemoveOwnedComponent ( UActorComponent *  Component)

Removes a component from the OwnedComponents array of the Actor.

In general this should not need to be called directly by anything other than UActorComponent functions

◆ Rename()

virtual bool AActor::Rename ( const TCHAR *  NewName = nullptr,
UObject *  NewOuter = nullptr,
ERenameFlags  Flags = REN_None 
)
overridevirtual

Rename this object to a unique name, or change its outer.

警告
Unless ForceNoResetLoaders is passed in, this will cause a flush of all level streaming.
参数
NewNameThe new name of the object, if null then NewOuter should be set
NewOuterNew Outer this object will be placed within, if null it will use the current outer
FlagsFlags to specify what happens during the rename

重载 UObject .

◆ ReregisterAllComponents()

virtual void AActor::ReregisterAllComponents ( )
virtual

Will reregister all components on this actor.

Does a lot of work - should only really be used in editor, generally use UpdateComponentTransforms or MarkComponentsRenderStateDirty.

◆ RewindForReplay()

virtual void AActor::RewindForReplay ( )
virtual

Called on the actor before checkpoint data is applied during a replay.

Only called if bReplayRewindable is set.

被 AWorldSettings , 以及 ALevelSequenceActor 重载.

◆ Serialize()

virtual void AActor::Serialize ( FArchive &  Ar)
overridevirtual

Handles reading, writing, and reference collecting using FArchive.

This implementation handles all FProperty serialization, but can be overridden for native variables.

重载 UObject .

被 APostProcessVolume, ARuntimeVirtualTextureVolume, ACameraActor, ADecalActor, ALODActor, ASceneCapture , 以及 AStaticMeshActor 重载.

◆ SetActorHiddenInGame()

virtual void AActor::SetActorHiddenInGame ( bool  bNewHidden)
virtual

Sets the actor to be hidden in the game

参数
bNewHiddenWhether or not to hide the actor and all its components

◆ SetActorLocation()

bool AActor::SetActorLocation ( const FVector &  NewLocation,
bool  bSweep = false,
FHitResult *  OutSweepHitResult = nullptr,
ETeleportType  Teleport = ETeleportType::None 
)

Move the actor instantly to the specified location.

参数
NewLocationThe new location to teleport the Actor to.
bSweepWhether we sweep to the destination location, triggering overlaps along the way and stopping short of the target if blocked by something. Only the root component is swept and checked for blocking collision, child components move without sweeping. If collision is off, this has no effect.
TeleportHow we teleport the physics state (if physics collision is enabled for this object). If equal to ETeleportType::TeleportPhysics, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location). If equal to ETeleportType::None, physics velocity is updated based on the change in position (affecting ragdoll parts). If CCD is on and not teleporting, this will affect objects along the entire swept volume.
OutSweepHitResultThe hit result from the move if swept.
返回
Whether the location was successfully set if not swept, or whether movement occurred if swept.

◆ SetActorLocationAndRotation()

bool AActor::SetActorLocationAndRotation ( FVector  NewLocation,
FRotator  NewRotation,
bool  bSweep = false,
FHitResult *  OutSweepHitResult = nullptr,
ETeleportType  Teleport = ETeleportType::None 
)

Move the actor instantly to the specified location and rotation.

参数
NewLocationThe new location to teleport the Actor to.
NewRotationThe new rotation for the Actor.
bSweepWhether we sweep to the destination location, triggering overlaps along the way and stopping short of the target if blocked by something. Only the root component is swept and checked for blocking collision, child components move without sweeping. If collision is off, this has no effect.
TeleportHow we teleport the physics state (if physics collision is enabled for this object). If equal to ETeleportType::TeleportPhysics, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location). If equal to ETeleportType::None, physics velocity is updated based on the change in position (affecting ragdoll parts). If CCD is on and not teleporting, this will affect objects along the entire swept volume.
OutSweepHitResultThe hit result from the move if swept.
返回
Whether the rotation was successfully set.

◆ SetActorRelativeScale3D()

void AActor::SetActorRelativeScale3D ( FVector  NewRelativeScale)

Set the actor's RootComponent to the specified relative scale 3d

参数
NewRelativeScaleNew scale to set the actor's RootComponent to

◆ SetActorRotation()

bool AActor::SetActorRotation ( FRotator  NewRotation,
ETeleportType  Teleport = ETeleportType::None 
)

Set the Actor's rotation instantly to the specified rotation.

参数
NewRotationThe new rotation for the Actor.
TeleportHow we teleport the physics state (if physics collision is enabled for this object). If equal to ETeleportType::TeleportPhysics, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location). If equal to ETeleportType::None, physics velocity is updated based on the change in position (affecting ragdoll parts).
返回
Whether the rotation was successfully set.

◆ SetActorTickEnabled()

void AActor::SetActorTickEnabled ( bool  bEnabled)

Set this actor's tick functions to be enabled or disabled.

Only has an effect if the function is registered This only modifies the tick function on actor itself

参数
bEnabledWhether it should be enabled or not

◆ SetActorTickInterval()

void AActor::SetActorTickInterval ( float  TickInterval)

Sets the tick interval of this actor's primary tick function.

Will not enable a disabled tick function. Takes effect on next tick.

参数
TickIntervalThe rate at which this actor should be ticking

◆ SetHidden()

void AActor::SetHidden ( const bool  bInHidden)

Sets the value of bHidden without causing other side effects to this instance.

SetActorHiddenInGame is preferred preferred in most cases because it respects virtual behavior.

◆ SetLifeSpan()

virtual void AActor::SetLifeSpan ( float  InLifespan)
virtual

Set the lifespan of this actor.

When it expires the object will be destroyed. If requested lifespan is 0, the timer is cleared and the actor will not be destroyed.

◆ SetLODParent()

void AActor::SetLODParent ( class UPrimitiveComponent *  InLODParent,
float  InParentDrawDistance 
)

Set LOD Parent component for all of our components, normally associated with an ALODActor.

参数
InLODParentThis component used to compute visibility when hierarchical LOD is enabled.
InParentDrawDistanceUpdates the MinDrawDistances of the LODParent

◆ SetNetDriverName()

void AActor::SetNetDriverName ( FName  NewNetDriverName)

Set the name of the net driver associated with this actor.

Will move the actor out of the list of network actors from the old net driver and add it to the new list

参数
NewNetDriverNamename of the new net driver association

◆ SetOwner()

virtual void AActor::SetOwner ( AActor *  NewOwner)
virtual

Set the owner of this Actor, used primarily for network replication.

参数
NewOwnerThe Actor who takes over ownership of this Actor

◆ SetReplicateMovement()

virtual void AActor::SetReplicateMovement ( bool  bInReplicateMovement)
virtual

Set whether this actor's movement replicates to network clients.

参数
bInReplicateMovementWhether this Actor's movement replicates to clients.

被 ACharacter 重载.

◆ SetReplicates()

void AActor::SetReplicates ( bool  bInReplicates)

Set whether this actor replicates to network clients.

When this actor is spawned on the server it will be sent to clients as well. Properties flagged for replication will update on clients if they change on the server. Internally changes the RemoteRole property and handles the cases where the actor needs to be added to the network actor list.

参数
bInReplicatesWhether this Actor replicates to network clients.
参见
https://docs.unrealengine.com/latest/INT/Gameplay/Networking/Replication/

◆ SetRootComponent()

bool AActor::SetRootComponent ( USceneComponent *  NewRootComponent)

Sets root component to be the specified component.

NewRootComponent's owner should be this actor.

返回
true if successful

◆ SetTickGroup()

void AActor::SetTickGroup ( ETickingGroup  NewTickGroup)

Sets the ticking group for this actor.

参数
NewTickGroupthe new value to assign

◆ SwapRoles()

void AActor::SwapRoles ( )

Calls this to swap the Role and RemoteRole.

Only call this if you know what you're doing!

◆ TakeDamage()

virtual float AActor::TakeDamage ( float  DamageAmount,
struct FDamageEvent const &  DamageEvent,
class AController *  EventInstigator,
AActor *  DamageCauser 
)
virtual

Apply damage to this actor.

参见
https://www.unrealengine.com/blog/damage-in-ue4
参数
DamageAmountHow much damage to apply
DamageEventData package that fully describes the damage received.
EventInstigatorThe Controller responsible for the damage.
DamageCauserThe Actor that directly caused the damage (e.g. the projectile that exploded, the rock that landed on you)
返回
The amount of damage actually applied.

被 APawn 重载.

◆ TearOff()

virtual void AActor::TearOff ( )
virtual

Networking - Server - TearOff this actor to stop replication to clients.

Will set bTearOff to true.

◆ TeleportTo()

virtual bool AActor::TeleportTo ( const FVector &  DestLocation,
const FRotator &  DestRotation,
bool  bIsATest = false,
bool  bNoCheck = false 
)
virtual

Used for adding actors to levels or teleporting them to a new location.

The result of this function is independent of the actor's current location and rotation. If the actor doesn't fit exactly at the location specified, tries to slightly move it out of walls and such if bNoCheck is false.

参数
DestLocationThe target destination point
DestRotationThe target rotation at the destination
bIsATestis true if this is a test movement, which shouldn't cause any notifications (used by AI pathfinding, for example)
bNoCheckis true if we should skip checking for encroachment in the world or other actors
返回
true if the actor has been successfully moved, or false if it couldn't fit.

◆ Tick()

virtual void AActor::Tick ( float  DeltaSeconds)
virtual

Function called every frame on this Actor.

Override this function to implement custom logic to be executed every frame. Note that Tick is disabled by default, and you will need to check PrimaryActorTick.bCanEverTick is set to true to enable it.

参数
DeltaSecondsGame time elapsed during last frame modified by the time dilation

被 ALODActor, AServerStatReplicator, AGameMode, AGeometryCollectionDebugDrawActor, ALevelSequenceActor, AAIController, ACameraRig_Crane , 以及 ACineCameraActor 重载.

◆ TickActor()

virtual void AActor::TickActor ( float  DeltaTime,
enum ELevelTick  TickType,
FActorTickFunction &  ThisTickFunction 
)
virtual

Dispatches the once-per frame Tick() function for this actor

参数
DeltaTimeThe time slice of this tick
TickTypeThe type of tick that is happening
ThisTickFunctionThe tick function that is firing, useful for getting the completion handle

被 AEQSTestingPawn, AController, APlayerController , 以及 ANavigationData 重载.

◆ TornOff()

virtual void AActor::TornOff ( )
virtual

Networking - called on client when actor is torn off (bTearOff==true), meaning it's no longer replicated to clients.

参见
bTearOff

被 ACharacter 重载.

◆ UnregisterAllComponents()

virtual void AActor::UnregisterAllComponents ( bool  bForReregister = false)
virtual

Unregister all currently registered components

参数
bForReregisterIf true, RegisterAllComponents will be called immediately after this so some slow operations can be avoided

◆ UpdateOverlaps()

void AActor::UpdateOverlaps ( bool  bDoNotifies = true)

Queries world and updates overlap detection state for this actor.

参数
bDoNotifiesTrue to dispatch being/end overlap notifications when these events occur.

◆ UserConstructionScript()

void AActor::UserConstructionScript ( )

Construction script, the place to spawn components and do other setup.

注解
Name used in CreateBlueprint function

◆ UseShortConnectTimeout()

virtual bool AActor::UseShortConnectTimeout ( ) const
inlinevirtual

Used by the net connection to determine if a net owning actor should switch to using the shortened timeout value

返回
true to switch from InitialConnectTimeout to ConnectionTimeout values on the net driver

被 APlayerController 重载.

◆ WasRecentlyRendered()

bool AActor::WasRecentlyRendered ( float  Tolerance = 0.2) const

Returns true if this actor has been rendered "recently", with a tolerance in seconds to define what "recent" means.

e.g.: If a tolerance of 0.1 is used, this function will return true only if the actor was rendered in the last 0.1 seconds of game time.

参数
ToleranceHow many seconds ago the actor last render time can be and still count as having been "recently" rendered.
返回
Whether this actor was recently rendered.

类成员变量说明

◆ bActorIsBeingConstructed

uint8 AActor::bActorIsBeingConstructed

Set while actor is being constructed.

Used to ensure that construction is not re-entrant.

◆ bActorSeamlessTraveled

uint8 AActor::bActorSeamlessTraveled

Indicates the actor was pulled through a seamless travel.


◆ bAllowReceiveTickEventOnDedicatedServer

uint8 AActor::bAllowReceiveTickEventOnDedicatedServer
protected

If false, the Blueprint ReceiveTick() event will be disabled on dedicated servers.

参见
AllowReceiveTickEventOnDedicatedServer()

◆ bAllowTickBeforeBeginPlay

uint8 AActor::bAllowTickBeforeBeginPlay

Whether we allow this Actor to tick before it receives the BeginPlay event.

Normally we don't tick actors until after BeginPlay; this setting allows this behavior to be overridden. This Actor must be able to tick for this setting to be relevant.

◆ bCollideWhenPlacing

uint8 AActor::bCollideWhenPlacing

This actor collides with the world when placing in the editor, even if RootComponent collision is disabled.

Does not affect spawning,

参见
SpawnCollisionHandlingMethod

◆ bExchangedRoles

uint8 AActor::bExchangedRoles

Whether we have already exchanged Role/RemoteRole on the client, as when removing then re-adding a streaming level.

Causes all initialization to be performed again even though the actor may not have actually been reloaded.

◆ bGenerateOverlapEventsDuringLevelStreaming

uint8 AActor::bGenerateOverlapEventsDuringLevelStreaming

If true, this actor will generate overlap Begin/End events when spawned as part of level streaming, which includes initial level load.

You might enable this is in the case where a streaming level loads around an actor and you want Begin/End overlap events to trigger.

参见
UpdateOverlapsMethodDuringLevelStreaming

◆ bIsEditorOnlyActor

uint8 AActor::bIsEditorOnlyActor

Whether this actor is editor-only.

Use with care, as if this actor is referenced by anything else that reference will be NULL in cooked builds

◆ bOnlyRelevantToOwner

uint8 AActor::bOnlyRelevantToOwner

If true, this actor is only relevant to its owner.

If this flag is changed during play, all non-owner channels would need to be explicitly closed.

◆ bReplayRewindable

uint8 AActor::bReplayRewindable

If true, this actor will only be destroyed during scrubbing if the replay is set to a time before the actor existed.

Otherwise, RewindForReplay will be called if we detect the actor needs to be reset. Note, this Actor must not be destroyed by gamecode, and RollbackViaDeletion may not be used.

◆ bReplicates

uint8 AActor::bReplicates
protected

If true, this actor will replicate to remote machines

参见
SetReplicates()

◆ CreationTime

float AActor::CreationTime

The time this actor was created, relative to World->GetTimeSeconds().

参见
UWorld::GetTimeSeconds()

◆ CustomTimeDilation

float AActor::CustomTimeDilation

Allow each actor to run at a different time speed.

The DeltaTime for a frame is multiplied by the global TimeDilation (in WorldSettings) and this CustomTimeDilation for this actor's tick.

◆ InitialLifeSpan

float AActor::InitialLifeSpan

How long this Actor lives before dying, 0=forever.

Note this is the INITIAL value and should not be modified once play has begun.

◆ Layers

TArray< FName > AActor::Layers

Layers the actor belongs to.

This is outside of the editoronly data to allow hiding of LD-specified layers at runtime for profiling.

◆ OnActorBeginOverlap

FActorBeginOverlapSignature AActor::OnActorBeginOverlap

Called when another actor begins to overlap this actor, for example a player walking into a trigger.

For events when objects have a blocking collision, for example a player hitting a wall, see 'Hit' events.

注解
Components on both this and the other Actor must have bGenerateOverlapEvents set to true to generate overlap events.

◆ OnActorEndOverlap

FActorEndOverlapSignature AActor::OnActorEndOverlap

Called when another actor stops overlapping this actor.

注解
Components on both this and the other Actor must have bGenerateOverlapEvents set to true to generate overlap events.

◆ OnActorHit

FActorHitSignature AActor::OnActorHit

Called when this Actor hits (or is hit by) something solid.

This could happen due to things like Character movement, using Set Location with 'sweep' enabled, or physics simulation. For events when objects overlap (e.g. walking into a trigger) see the 'Overlap' event.

注解
For collisions during physics simulation to generate hit events, 'Simulation Generates Hit Events' must be enabled.

◆ PrimaryActorTick

struct FActorTickFunction AActor::PrimaryActorTick

Primary Actor tick function, which calls TickActor().

Tick functions can be configured to control whether ticking is enabled, at what time during a frame the update occurs, and to set up tick dependencies.

参见
https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/Engine/FTickFunction/
AddTickPrerequisiteActor(), AddTickPrerequisiteComponent()

◆ SpawnCollisionHandlingMethod

ESpawnActorCollisionHandlingMethod AActor::SpawnCollisionHandlingMethod

Controls how to handle spawning this actor in a situation where it's colliding with something else.

"Default" means AlwaysSpawn here.

◆ UpdateOverlapsMethodDuringLevelStreaming

EActorUpdateOverlapsMethod AActor::UpdateOverlapsMethodDuringLevelStreaming
protected

Condition for calling UpdateOverlaps() to initialize overlap state when loaded in during level streaming.

If set to 'UseConfigDefault', the default specified in ini (displayed in 'DefaultUpdateOverlapsMethodDuringLevelStreaming') will be used. If overlaps are not initialized, this actor and attached components will not have an initial state of what objects are touching it, and overlap events may only come in once one of those objects update overlaps themselves (for example when moving). However if an object touching it does initialize state, both objects will know about their touching state with each other. This can be a potentially large performance savings during level loading and streaming, and is safe if the object and others initially overlapping it do not need the overlap state because they will not trigger overlap notifications.

Note that if 'bGenerateOverlapEventsDuringLevelStreaming' is true, overlaps are always updated in this case, but that flag determines whether the Begin/End overlap events are triggered.

参见
bGenerateOverlapEventsDuringLevelStreaming, DefaultUpdateOverlapsMethodDuringLevelStreaming, GetUpdateOverlapsMethodDuringLevelStreaming()

该类的文档由以下文件生成: