bool WasRecentlyRendered(float Tolerance); // 返回bool值,表示最近是否被渲染过 void UserConstructionScript(); // 虚函数,用于在蓝图中自定义构造函数 void TearOff(); // 从父级分离Actor void SnapRootComponentTo(class AActor* InParentActor, const class FName& InSocketName); // 将Actor的Root Component与父级Actor的指定Socket对齐 void SetTickGroup(ETickingGroup NewTickGroup); // 设置Actor的Tick Group void SetTickableWhenPaused(bool bTickableWhenPaused); // 设置Actor是否在游戏暂停时可以执行Tick void SetReplicates(bool bInReplicates); // 设置Actor是否在网络中进行复制 void SetReplicateMovement(bool bInReplicateMovement); // 设置Actor是否在网络中进行移动复制 void SetOwner(class AActor* NewOwner); // 设置Actor的Owner void SetNetDormancy(ENetDormancy NewDormancy); // 设置Actor的网络休眠状态 void SetLifeSpan(float InLifespan); // 设置Actor的生命周期 void SetAutoDestroyWhenFinished(bool bVal); // 设置在动画播放完后自动销毁Actor void SetActorTickInterval(float TickInterval); // 设置Actor的Tick间隔 void SetActorTickEnabled(bool bEnabled); // 设置Actor的Tick是否启用 void SetActorScale3D(const struct FVector& NewScale3D); // 设置Actor的缩放值 void SetActorRelativeScale3D(const struct FVector& NewRelativeScale); // 设置Actor的相对缩放值 void SetActorHiddenInGame(bool bNewHidden); // 设置Actor在游戏中是否隐藏 void SetActorEnableCollision(bool bNewActorEnableCollision); // 设置Actor是否启用碰撞 void RemoveTickPrerequisiteComponent(class UActorComponent* PrerequisiteComponent); // 移除Actor的Tick先决条件Component void RemoveTickPrerequisiteActor(class AActor* PrerequisiteActor); // 移除Actor的Tick先决条件Actor void ReceiveTick(float DeltaSeconds); // 虚函数,在每次Tick时调用 void ReceiveRadialDamage(float DamageReceived, class UDamageType* DamageType, const struct FVector& Origin, const struct FHitResult& HitInfo, class AController* InstigatedBy, class AActor* DamageCauser); // 虚函数,接收径向伤害 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); // 虚函数,接收点伤害 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); // 虚函数,接收碰撞事件 void ReceiveEndPlay(EEndPlayReason EndPlayReason); // 虚函数,接收Actor结束游戏的事件 void ReceiveDestroyed(); // 虚函数,接收Actor被销毁的事件 void ReceiveBeginPlay(); // 虚函数,接收Actor开始游戏的事件 void ReceiveAnyDamage(float Damage, class UDamageType* DamageType, class AController* InstigatedBy, class AActor* DamageCauser); // 虚函数,接收任何形式的伤害 void ReceiveActorOnReleased(const struct FKey& ButtonReleased); // 虚函数,接收Actor的鼠标按钮松开事件 void ReceiveActorOnInputTouchLeave(ETouchIndex FingerIndex); // 虚函数,接收Actor的Touch离开事件 void ReceiveActorOnInputTouchEnter(ETouchIndex FingerIndex); // 虚函数,接收Actor的Touch进入事件 void ReceiveActorOnInputTouchEnd(ETouchIndex FingerIndex); // 虚函数,接收Actor的Touch结束事件 void ReceiveActorOnInputTouchBegin(ETouchIndex FingerIndex); // 虚函数,接收Actor的Touch开始事件 void ReceiveActorOnClicked(const struct FKey& ButtonPressed); // 虚函数,接收Actor的鼠标按钮点击事件 void ReceiveActorEndOverlap(class AActor* OtherActor); // 虚函数,接收Actor结束重叠事件 void ReceiveActorEndCursorOver(); // 虚函数,接收Actor结束光标悬停事件 void ReceiveActorBeginOverlap(class AActor* OtherActor); // 虚函数,接收Actor开始重叠事件 void ReceiveActorBeginCursorOver(); // 虚函数,接收Actor开始光标悬停事件 void PrestreamTextures(float Seconds, bool bEnableStreaming, int32_t CinematicTextureGroups); // 预加载纹理资源 void OnRep_ReplicateMovement(); // 当ReplicateMovement属性更新时调用 void OnRep_ReplicatedMovement(); // 当复制过来的运动属性更新时调用 void OnRep_Owner(); // 当Owner属性更新时调用 void OnRep_Instigator(); // 当Instigator属性更新时调用 void OnRep_AttachmentReplication(); // 当Attachment属性更新时调用 void MakeNoise(float Loudness, class APawn* NoiseInstigator, const struct FVector& NoiseLocation, float MaxRange, const class FName& Tag); // 在指定位置产生噪声 class UMaterialInstanceDynamic* MakeMIDForMaterial(class UMaterialInterface* Parent); // 为指定材质创建动态实例 bool K2_TeleportTo(const struct FVector& DestLocation, const struct FRotator& DestRotation); // 传送Actor到指定位置和朝向 bool K2_SetActorTransform(const struct FTransform& NewTransform, bool bSweep, struct FHitResult* SweepHitResult, bool bTeleport); // 设置Actor的Transform信息 bool K2_SetActorRotation(const struct FRotator& NewRotation, bool bTeleportPhysics); // 设置Actor的旋转信息 void K2_SetActorRelativeTransform(const struct FTransform& NewRelativeTransform, bool bSweep, struct FHitResult* SweepHitResult, bool bTeleport); // 设置Actor相对于父级Actor的Transform信息 void K2_SetActorRelativeRotation(const struct FRotator& NewRelativeRotation, bool bSweep, struct FHitResult* SweepHitResult, bool bTeleport); // 设置Actor相对于父级Actor的旋转信息 void K2_SetActorRelativeLocation(const struct FVector& NewRelativeLocation, bool bSweep, struct FHitResult* SweepHitResult, bool bTeleport); // 设置Actor相对于父级Actor的位置信息 bool K2_SetActorLocationAndRotation(const struct FVector& NewLocation, const struct FRotator& NewRotation, bool bSweep, struct FHitResult* SweepHitResult, bool bTeleport); // 同时设置Actor的位置和旋转信息 bool K2_SetActorLocation(const struct FVector& NewLocation, bool bSweep, struct FHitResult* SweepHitResult, bool bTeleport); // 设置Actor的位置信息 void K2_OnReset(); // 虚函数,当Actor被重置时调用 void K2_OnEndViewTarget(class APlayerController* PC); // 虚函数,当Actor不再是视角目标时调用 void K2_OnBecomeViewTarget(class APlayerController* PC); // 虚函数,当Actor成为视角目标时调用 class USceneComponent* K2_GetRootComponent(); // 获取Actor的Root Component TArray<class UActorComponent*> K2_GetComponentsByClass(class UClass* ComponentClass); // 获取Actor中指定类型的Component struct FRotator K2_GetActorRotation(); // 获取Actor的旋转信息 struct FVector K2_GetActorLocation(); // 获取Actor的位置信息 void K2_DetachFromActor(EDetachmentRule LocationRule, EDetachmentRule RotationRule, EDetachmentRule ScaleRule); // 从父级分离Actor void K2_DestroyComponent(class UActorComponent* Component); // 销毁Actor的Component void K2_DestroyActor(); // 销毁Actor void K2_AttachToComponent(class USceneComponent* Parent, const class FName& SocketName, EAttachmentRule LocationRule, EAttachmentRule RotationRule, EAttachmentRule ScaleRule, bool bWeldSimulatedBodies); // 将Actor的Root Component附加到指定Component上 void K2_AttachToActor(class AActor* ParentActor, const class FName& SocketName, EAttachmentRule LocationRule, EAttachmentRule RotationRule, EAttachmentRule ScaleRule, bool bWeldSimulatedBodies); // 将Actor的Root Component附加到指定Actor上 void K2_AttachRootComponentToActor(class AActor* InParentActor, const class FName& InSocketName, EAttachLocation AttachLocationType, bool bWeldSimulatedBodies); // 将Actor的Root Component附加到指定Actor的指定Socket上 void K2_AttachRootComponentTo(class USceneComponent* InParent, const class FName& InSocketName, EAttachLocation AttachLocationType, bool bWeldSimulatedBodies); // 将Actor的Root Component附加到指定Component的指定Socket上 void K2_AddActorWorldTransformKeepScale(const struct FTransform& DeltaTransform, bool bSweep, struct FHitResult* SweepHitResult, bool bTeleport); // 添加世界坐标系的Transform信息,保持缩放比例 void K2_AddActorWorldTransform(const struct FTransform& DeltaTransform, bool bSweep, struct FHitResult* SweepHitResult, bool bTeleport); // 添加世界坐标系的Transform信息 void K2_AddActorWorldRotation(const struct FRotator& DeltaRotation, bool bSweep, struct FHitResult* SweepHitResult, bool bTeleport); // 添加世界坐标系的旋转信息 void K2_AddActorWorldOffset(const struct FVector& DeltaLocation, bool bSweep, struct FHitResult* SweepHitResult, bool bTeleport); // 添加世界坐标系的位置信息 void K2_AddActorLocalTransform(const struct FTransform& NewTransform, bool bSweep, struct FHitResult* SweepHitResult, bool bTeleport); // 添加局部坐标系的Transform信息 void K2_AddActorLocalRotation(const struct FRotator& DeltaRotation, bool bSweep, struct FHitResult* SweepHitResult, bool bTeleport); // 添加局部坐标系的旋转信息 void K2_AddActorLocalOffset(const struct FVector& DeltaLocation, bool bSweep, struct FHitResult* SweepHitResult, bool bTeleport); // 添加局部坐标系的位置信息 bool IsOverlappingActor(class AActor* Other); // 判断Actor是否与另一个Actor重叠 bool IsChildActor(); // 判断Actor是否是子Actor bool IsActorTickEnabled(); // 判断Actor的Tick是否启用 bool IsActorBeingDestroyed(); // 判断Actor是否正在被销毁 bool HasAuthority(); // 判断Actor是否拥有Authority float GetVerticalDistanceTo(class AActor* OtherActor); // 获取Actor到另一个Actor的垂直距离 struct FVector GetVelocity(); // 获取Actor的速度 struct FTransform GetTransform(); // 获取Actor的Transform信息 bool GetTickableWhenPaused(); // 获取Actor在游戏暂停时是否可以执行Tick float GetSquaredHorizontalDistanceTo(class AActor* OtherActor); // 获取Actor到另一个Actor的水平距离的平方 float GetSquaredDistanceTo(class AActor* OtherActor); // 获取Actor到另一个Actor的距离的平方 ENetRole GetRemoteRole(); // 获取Actor的远程角色 class UChildActorComponent* GetParentComponent(); // 获取Actor的父级Component class AActor* GetParentActor(); // 获取Actor的父级Actor class AActor* GetOwner(); // 获取Actor的Owner void GetOverlappingComponents(TArray<class UPrimitiveComponent*>* OverlappingComponents); // 获取Actor重叠的Component void GetOverlappingActors(TArray<class AActor*>* OverlappingActors, class UClass* ClassFilter); // 获取Actor重叠的Actor ENetRole GetLocalRole(); // 获取Actor的本地角色 float GetLifeSpan(); // 获取Actor的生命周期 class AController* GetInstigatorController(); // 获取Actor的Instigator Controller class APawn* GetInstigator(); // 获取Actor的Instigator struct FVector GetInputVectorAxisValue(const struct FKey& InputAxisKey); // 获取Actor的输入方向 float GetInputAxisValue(const class FName& InputAxisName); // 获取Actor的输入轴的值 float GetInputAxisKeyValue(const struct FKey& InputAxisKey); // 获取Actor的输入轴的值 float GetHorizontalDotProductTo(class AActor* OtherActor); // 获取Actor到另一个Actor的水平方向的点积 float GetHorizontalDistanceTo(class AActor* OtherActor); // 获取Actor到另一个Actor的水平距离 float GetGameTimeSinceCreation(); // 获取Actor从创建至今的游戏时间 float GetDotProductTo(class AActor* OtherActor); // 获取Actor到另一个Actor的点积 float GetDistanceTo(class AActor* OtherActor); // 获取Actor到另一个Actor的距离 TArray<class UActorComponent*> GetComponentsByTag(class UClass* ComponentClass, const class FName& Tag); // 获取Actor中带有指定Tag的Component TArray<class UActorComponent*> GetComponentsByInterface(class UClass* Interface); // 获取Actor中实现指定接口的Component class UActorComponent* GetComponentByClass(class UClass* ComponentClass); // 获取Actor中指定类型的Component class FName GetAttachParentSocketName(); // 获取Actor附加到的Socket名称 class AActor* GetAttachParentActor(); // 获取Actor附加到的Actor void GetAttachedActors(TArray<class AActor*>* OutActors, bool bResetArray); // 获取Actor附加的Actor void GetAllChildActors(TArray<class AActor*>* ChildActors, bool bIncludeDescendants); // 获取Actor的所有子Actor struct FVector GetActorUpVector(); // 获取Actor的Up Vector float GetActorTimeDilation(); // 获取Actor的时间膨胀值 float GetActorTickInterval(); // 获取Actor的Tick间隔 struct FVector GetActorScale3D(); // 获取Actor的缩放值 struct FVector GetActorRightVector(); // 获取Actor的Right Vector struct FVector GetActorRelativeScale3D(); // 获取Actor的相对缩放值 struct FVector GetActorForwardVector(); // 获取Actor的Forward Vector void GetActorEyesViewPoint(struct FVector* OutLocation, struct FRotator* OutRotation); // 获取Actor的视角位置和旋转 bool GetActorEnableCollision(); // 获取Actor是否启用碰撞 void GetActorBounds(bool bOnlyCollidingComponents, struct FVector* Origin, struct FVector* BoxExtent, bool bIncludeFromChildActors); // 获取Actor的包围盒 void ForceNetUpdate(); // 强制Actor进行网络更新 void FlushNetDormancy(); // 刷新Actor的网络休眠状态 void FinishAddComponent(class UActorComponent* Component, bool bManualAttachment, const struct FTransform& RelativeTransform); // 完成Component的添加 void EnableInput(class APlayerController* PlayerController); // 启用Actor的输入 void DisableInput(class APlayerController* PlayerController); // 禁用Actor的输入 void DetachRootComponentFromParent(bool bMaintainWorldPosition); // 将Actor的Root Component从父级分离 void AddTickPrerequisiteComponent(class UActorComponent* PrerequisiteComponent); // 添加Actor的Tick先决条件Component void AddTickPrerequisiteActor(class AActor* PrerequisiteActor); // 添加Actor的Tick先决条件Actor class UActorComponent* AddComponentByClass(class UClass* Class, bool bManualAttachment, const struct FTransform& RelativeTransform, bool bDeferredFinish); // 使用类添加Component class UActorComponent* AddComponent(const class FName& TemplateName, bool bManualAttachment, const struct FTransform& RelativeTransform, class UObject* ComponentTemplateContext, bool bDeferredFinish); // 添加Component bool ActorHasTag(const class FName& Tag); // 判断Actor是否拥有指定Tag

Unreal Engine Actor类常用函数详解

原文地址: https://www.cveoy.top/t/topic/nKU9 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录