Unreal Engine Actor Functions: Comprehensive Guide and Reference
bool WasRecentlyRendered(float Tolerance); // Returns true if the Actor has been rendered recently void UserConstructionScript(); // Custom construction function for building Actors in Blueprints void TearOff(); // Removes the Actor from the current scene but doesn't destroy it void SnapRootComponentTo(class AActor* InParentActor, const class FName& InSocketName); // Aligns the Actor's root component with the specified Actor or Socket position void SetTickGroup(ETickingGroup NewTickGroup); // Sets the Actor's Tick Group void SetTickableWhenPaused(bool bTickableWhenPaused); // Sets whether the Actor should tick when paused void SetReplicates(bool bInReplicates); // Sets whether the Actor should be replicated over the network void SetReplicateMovement(bool bInReplicateMovement); // Sets whether the Actor's movement should be replicated over the network void SetOwner(class AActor* NewOwner); // Sets the Actor's owner void SetNetDormancy(ENetDormancy NewDormancy); // Sets the Actor's network dormancy state void SetLifeSpan(float InLifespan); // Sets the Actor's lifespan void SetAutoDestroyWhenFinished(bool bVal); // Sets whether the Actor should be automatically destroyed when finished void SetActorTickInterval(float TickInterval); // Sets the Actor's Tick interval time void SetActorTickEnabled(bool bEnabled); // Enables or disables the Actor's Tick void SetActorScale3D(const struct FVector& NewScale3D); // Sets the Actor's scaling factor void SetActorRelativeScale3D(const struct FVector& NewRelativeScale); // Sets the Actor's relative scaling factor void SetActorHiddenInGame(bool bNewHidden); // Hides or shows the Actor in the game void SetActorEnableCollision(bool bNewActorEnableCollision); // Enables or disables the Actor's collision void RemoveTickPrerequisiteComponent(class UActorComponent* PrerequisiteComponent); // Removes the specified component from the Actor's Tick prerequisites list void RemoveTickPrerequisiteActor(class AActor* PrerequisiteActor); // Removes the specified Actor from the Actor's Tick prerequisites list void ReceiveTick(float DeltaSeconds); // Called every frame during Tick void ReceiveRadialDamage(float DamageReceived, class UDamageType* DamageType, const struct FVector& Origin, const struct FHitResult& HitInfo, class AController* InstigatedBy, class AActor* DamageCauser); // Receives radial damage void ReceivePointDamage(float Damage, class UDamageType* DamageType, const struct FVector& HitLocation, const struct FVector& HitNormal, class UPrimitiveComponent* HitComponent, const class FName& BoneName, const struct FVector& ShotFromDirection, class AController* InstigatedBy, class AActor* DamageCauser, const struct FHitResult& HitInfo); // Receives point damage void ReceiveHit(class UPrimitiveComponent* MyComp, class AActor* Other, class UPrimitiveComponent* OtherComp, bool bSelfMoved, const struct FVector& HitLocation, const struct FVector& HitNormal, const struct FVector& NormalImpulse, const struct FHitResult& hit); // Receives collision events void ReceiveEndPlay(EEndPlayReason EndPlayReason); // Called when the Actor ends void ReceiveDestroyed(); // Called when the Actor is destroyed void ReceiveBeginPlay(); // Called when the Actor starts playing void ReceiveAnyDamage(float Damage, class UDamageType* DamageType, class AController* InstigatedBy, class AActor* DamageCauser); // Receives any type of damage void ReceiveActorOnReleased(const struct FKey& ButtonReleased); // Called when the Actor is released void ReceiveActorOnInputTouchLeave(ETouchIndex FingerIndex); // Called when the Actor's input event ends void ReceiveActorOnInputTouchEnter(ETouchIndex FingerIndex); // Called when the Actor's input event starts void ReceiveActorOnInputTouchEnd(ETouchIndex FingerIndex); // Called when the Actor's input event ends void ReceiveActorOnInputTouchBegin(ETouchIndex FingerIndex); // Called when the Actor's input event starts void ReceiveActorOnClicked(const struct FKey& ButtonPressed); // Called when the Actor is clicked void ReceiveActorEndOverlap(class AActor* OtherActor); // Called when the Actor ends overlapping with another Actor void ReceiveActorEndCursorOver(); // Called when the mouse cursor stops hovering over the Actor void ReceiveActorBeginOverlap(class AActor* OtherActor); // Called when the Actor starts overlapping with another Actor void ReceiveActorBeginCursorOver(); // Called when the mouse cursor starts hovering over the Actor void PrestreamTextures(float Seconds, bool bEnableStreaming, int32_t CinematicTextureGroups); // Preloads texture resources void OnRep_ReplicateMovement(); // Handles the Actor's replicated movement void OnRep_ReplicatedMovement(); // Handles the Actor's replicated movement void OnRep_Owner(); // Handles changes to the Actor's owner void OnRep_Instigator(); // Handles changes to the Actor's instigator void OnRep_AttachmentReplication(); // Handles the Actor's attached components replication void MakeNoise(float Loudness, class APawn* NoiseInstigator, const struct FVector& NoiseLocation, float MaxRange, const class FName& Tag); // Makes a noise at the specified location class UMaterialInstanceDynamic* MakeMIDForMaterial(class UMaterialInterface* Parent); // Creates a dynamic material instance for the specified material bool K2_TeleportTo(const struct FVector& DestLocation, const struct FRotator& DestRotation); // Teleports the Actor instantly to the specified location and rotation bool K2_SetActorTransform(const struct FTransform& NewTransform, bool bSweep, struct FHitResult* SweepHitResult, bool bTeleport); // Sets the Actor's transform bool K2_SetActorRotation(const struct FRotator& NewRotation, bool bTeleportPhysics); // Sets the Actor's rotation void K2_SetActorRelativeTransform(const struct FTransform& NewRelativeTransform, bool bSweep, struct FHitResult* SweepHitResult, bool bTeleport); // Sets the Actor's relative transform void K2_SetActorRelativeRotation(const struct FRotator& NewRelativeRotation, bool bSweep, struct FHitResult* SweepHitResult, bool bTeleport); // Sets the Actor's relative rotation void K2_SetActorRelativeLocation(const struct FVector& NewRelativeLocation, bool bSweep, struct FHitResult* SweepHitResult, bool bTeleport); // Sets the Actor's relative location bool K2_SetActorLocationAndRotation(const struct FVector& NewLocation, const struct FRotator& NewRotation, bool bSweep, struct FHitResult* SweepHitResult, bool bTeleport); // Sets the Actor's location and rotation bool K2_SetActorLocation(const struct FVector& NewLocation, bool bSweep, struct FHitResult* SweepHitResult, bool bTeleport); // Sets the Actor's location void K2_OnReset(); // Called when the Actor is reset void K2_OnEndViewTarget(class APlayerController* PC); // Called when the Actor stops being a view target void K2_OnBecomeViewTarget(class APlayerController* PC); // Called when the Actor becomes a view target class USceneComponent* K2_GetRootComponent(); // Gets the Actor's root component TArray<class UActorComponent*> K2_GetComponentsByClass(class UClass* ComponentClass); // Gets the components of a specified type in the Actor struct FRotator K2_GetActorRotation(); // Gets the Actor's rotation struct FVector K2_GetActorLocation(); // Gets the Actor's location void K2_DetachFromActor(EDetachmentRule LocationRule, EDetachmentRule RotationRule, EDetachmentRule ScaleRule); // Detaches the Actor from its parent void K2_DestroyComponent(class UActorComponent* Component); // Destroys the specified component void K2_DestroyActor(); // Destroys the Actor void K2_AttachToComponent(class USceneComponent* Parent, const class FName& SocketName, EAttachmentRule LocationRule, EAttachmentRule RotationRule, EAttachmentRule ScaleRule, bool bWeldSimulatedBodies); // Attaches the Actor to a component void K2_AttachToActor(class AActor* ParentActor, const class FName& SocketName, EAttachmentRule LocationRule, EAttachmentRule RotationRule, EAttachmentRule ScaleRule, bool bWeldSimulatedBodies); // Attaches the Actor to another Actor void K2_AttachRootComponentToActor(class AActor* InParentActor, const class FName& InSocketName, EAttachLocation AttachLocationType, bool bWeldSimulatedBodies); // Attaches the Actor's root component to another Actor void K2_AttachRootComponentTo(class USceneComponent* InParent, const class FName& InSocketName, EAttachLocation AttachLocationType, bool bWeldSimulatedBodies); // Attaches the Actor's root component to a component void K2_AddActorWorldTransformKeepScale(const struct FTransform& DeltaTransform, bool bSweep, struct FHitResult* SweepHitResult, bool bTeleport); // Adds a transform to the Actor's world transform void K2_AddActorWorldTransform(const struct FTransform& DeltaTransform, bool bSweep, struct FHitResult* SweepHitResult, bool bTeleport); // Adds a transform to the Actor's world transform void K2_AddActorWorldRotation(const struct FRotator& DeltaRotation, bool bSweep, struct FHitResult* SweepHitResult, bool bTeleport); // Adds a rotation to the Actor's world rotation void K2_AddActorWorldOffset(const struct FVector& DeltaLocation, bool bSweep, struct FHitResult* SweepHitResult, bool bTeleport); // Adds an offset to the Actor's world location void K2_AddActorLocalTransform(const struct FTransform& NewTransform, bool bSweep, struct FHitResult* SweepHitResult, bool bTeleport); // Adds a transform to the Actor's local transform void K2_AddActorLocalRotation(const struct FRotator& DeltaRotation, bool bSweep, struct FHitResult* SweepHitResult, bool bTeleport); // Adds a rotation to the Actor's local rotation void K2_AddActorLocalOffset(const struct FVector& DeltaLocation, bool bSweep, struct FHitResult* SweepHitResult, bool bTeleport); // Adds an offset to the Actor's local location bool IsOverlappingActor(class AActor* Other); // Checks if the Actor is overlapping with another Actor bool IsChildActor(); // Checks if the Actor is a child Actor bool IsActorTickEnabled(); // Checks if the Actor's Tick is enabled bool IsActorBeingDestroyed(); // Checks if the Actor is being destroyed bool HasAuthority(); // Checks if the Actor has authority float GetVerticalDistanceTo(class AActor* OtherActor); // Gets the vertical distance between the Actor and another Actor struct FVector GetVelocity(); // Gets the Actor's velocity struct FTransform GetTransform(); // Gets the Actor's transform bool GetTickableWhenPaused(); // Gets whether the Actor should tick when paused float GetSquaredHorizontalDistanceTo(class AActor* OtherActor); // Gets the squared horizontal distance between the Actor and another Actor float GetSquaredDistanceTo(class AActor* OtherActor); // Gets the squared distance between the Actor and another Actor ENetRole GetRemoteRole(); // Gets the Actor's remote role class UChildActorComponent* GetParentComponent(); // Gets the Actor's parent component class AActor* GetParentActor(); // Gets the Actor's parent Actor class AActor* GetOwner(); // Gets the Actor's owner void GetOverlappingComponents(TArray<class UPrimitiveComponent*>* OverlappingComponents); // Gets the components overlapping with the Actor void GetOverlappingActors(TArray<class AActor*>* OverlappingActors, class UClass* ClassFilter); // Gets the Actors overlapping with the Actor ENetRole GetLocalRole(); // Gets the Actor's local role float GetLifeSpan(); // Gets the Actor's lifespan class AController* GetInstigatorController(); // Gets the Actor's instigator controller class APawn* GetInstigator(); // Gets the Actor's instigator struct FVector GetInputVectorAxisValue(const struct FKey& InputAxisKey); // Gets the input vector axis value float GetInputAxisValue(const class FName& InputAxisName); // Gets the input axis value float GetInputAxisKeyValue(const struct FKey& InputAxisKey); // Gets the input axis value float GetHorizontalDotProductTo(class AActor* OtherActor); // Gets the horizontal dot product between the Actor and another Actor float GetHorizontalDistanceTo(class AActor* OtherActor); // Gets the horizontal distance between the Actor and another Actor float GetGameTimeSinceCreation(); // Gets the time since the Actor was created float GetDotProductTo(class AActor* OtherActor); // Gets the dot product between the Actor and another Actor float GetDistanceTo(class AActor* OtherActor); // Gets the distance between the Actor and another Actor TArray<class UActorComponent*> GetComponentsByTag(class UClass* ComponentClass, const class FName& Tag); // Gets the components of a specified type in the Actor with the specified tag TArray<class UActorComponent*> GetComponentsByInterface(class UClass* Interface); // Gets the components implementing a specified interface in the Actor class UActorComponent* GetComponentByClass(class UClass* ComponentClass); // Gets the component of a specified type in the Actor class FName GetAttachParentSocketName(); // Gets the socket name of the Actor's parent class AActor* GetAttachParentActor(); // Gets the Actor's parent Actor void GetAttachedActors(TArray<class AActor*>* OutActors, bool bResetArray); // Gets the Actors attached to the Actor void GetAllChildActors(TArray<class AActor*>* ChildActors, bool bIncludeDescendants); // Gets all child Actors of the Actor struct FVector GetActorUpVector(); // Gets the Actor's up vector float GetActorTimeDilation(); // Gets the Actor's time dilation float GetActorTickInterval(); // Gets the Actor's Tick interval struct FVector GetActorScale3D(); // Gets the Actor's scaling factor struct FVector GetActorRightVector(); // Gets the Actor's right vector struct FVector GetActorRelativeScale3D(); // Gets the Actor's relative scaling factor struct FVector GetActorForwardVector(); // Gets the Actor's forward vector void GetActorEyesViewPoint(struct FVector* OutLocation, struct FRotator* OutRotation); // Gets the Actor's eye view point bool GetActorEnableCollision(); // Checks if the Actor's collision is enabled void GetActorBounds(bool bOnlyCollidingComponents, struct FVector* Origin, struct FVector* BoxExtent, bool bIncludeFromChildActors); // Gets the Actor's bounds void ForceNetUpdate(); // Forces a network update void FlushNetDormancy(); // Flushes the Actor's network dormancy state void FinishAddComponent(class UActorComponent* Component, bool bManualAttachment, const struct FTransform& RelativeTransform); // Completes the addition of a component void EnableInput(class APlayerController* PlayerController); // Enables input for the specified PlayerController void DisableInput(class APlayerController* PlayerController); // Disables input for the specified PlayerController void DetachRootComponentFromParent(bool bMaintainWorldPosition); // Detaches the Actor's root component from its parent void AddTickPrerequisiteComponent(class UActorComponent* PrerequisiteComponent); // Adds a component to the Actor's Tick prerequisites list void AddTickPrerequisiteActor(class AActor* PrerequisiteActor); // Adds an Actor to the Actor's Tick prerequisites list class UActorComponent* AddComponentByClass(class UClass* Class, bool bManualAttachment, const struct FTransform& RelativeTransform, bool bDeferredFinish); // Adds a component of the specified class to the Actor class UActorComponent* AddComponent(const class FName& TemplateName, bool bManualAttachment, const struct FTransform& RelativeTransform, class UObject* ComponentTemplateContext, bool bDeferredFinish); // Adds a component based on a template to the Actor bool ActorHasTag(const class FName& Tag); // Checks if the Actor has a specific tag static UClass* StaticClass(); // Gets the static class of the Actor
原文地址: https://www.cveoy.top/t/topic/nKVi 著作权归作者所有。请勿转载和采集!