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

PrimitiveComponents are SceneComponents that contain or generate some sort of geometry, generally to be rendered or used as collision data. 更多...

#include <PrimitiveComponent.h>

+ 类 UPrimitiveComponent 继承关系图:

Public 成员函数

virtual void AddAngularImpulse (FVector Impulse, FName BoneName=NAME_None, bool bVelChange=false)
 Add an angular impulse to a single rigid body. 更多...
 
void AddAngularImpulseInDegrees (FVector Impulse, FName BoneName=NAME_None, bool bVelChange=false)
 Add an angular impulse to a single rigid body. 更多...
 
virtual void AddAngularImpulseInRadians (FVector Impulse, FName BoneName=NAME_None, bool bVelChange=false)
 Add an angular impulse to a single rigid body. 更多...
 
virtual void AddForce (FVector Force, FName BoneName=NAME_None, bool bAccelChange=false)
 Add a force to a single rigid body. 更多...
 
virtual void AddForceAtLocation (FVector Force, FVector Location, FName BoneName=NAME_None)
 Add a force to a single rigid body at a particular location in world space. 更多...
 
virtual void AddForceAtLocationLocal (FVector Force, FVector Location, FName BoneName=NAME_None)
 Add a force to a single rigid body at a particular location. 更多...
 
virtual void AddImpulse (FVector Impulse, FName BoneName=NAME_None, bool bVelChange=false)
 Add an impulse to a single rigid body. 更多...
 
virtual void AddImpulseAtLocation (FVector Impulse, FVector Location, FName BoneName=NAME_None)
 Add an impulse to a single rigid body at a specific location. 更多...
 
virtual void AddRadialForce (FVector Origin, float Radius, float Strength, enum ERadialImpulseFalloff Falloff, bool bAccelChange=false)
 Add a force to all bodies in this component, originating from the supplied world-space location. 更多...
 
virtual void AddRadialImpulse (FVector Origin, float Radius, float Strength, enum ERadialImpulseFalloff Falloff, bool bVelChange=false)
 Add an impulse to all rigid bodies in this component, radiating out from the specified position. 更多...
 
void AddTorque (FVector Torque, FName BoneName=NAME_None, bool bAccelChange=false)
 Add a torque to a single rigid body. 更多...
 
void AddTorqueInDegrees (FVector Torque, FName BoneName=NAME_None, bool bAccelChange=false)
 Add a torque to a single rigid body. 更多...
 
virtual void AddTorqueInRadians (FVector Torque, FName BoneName=NAME_None, bool bAccelChange=false)
 Add a torque to a single rigid body. 更多...
 
virtual bool AreSymmetricRotations (const FQuat &A, const FQuat &B, const FVector &Scale3D) const
 Returns true if the given transforms result in the same bounds, due to rotational symmetry. 更多...
 
void BeginComponentOverlap (const FOverlapInfo &OtherOverlap, bool bDoNotifies)
 Begin tracking an overlap interaction with the component specified. 更多...
 
virtual void BeginDestroy () override
 Called before destroying the object. 更多...
 
virtual void BeginPlay () override
 Used to detach physics objects before simulation begins. 更多...
 
virtual bool BuildTextureStreamingData (ETextureStreamingBuildType BuildType, EMaterialQualityLevel::Type QualityLevel, ERHIFeatureLevel::Type FeatureLevel, TSet< FGuid > &DependentResources)
 Update the streaming data of this component. 更多...
 
virtual float CalculateMass (FName BoneName=NAME_None)
 Returns the calculated mass in kg. 更多...
 
virtual bool CanCharacterStepUp (class APawn *Pawn) const
 Return true if the given Pawn can step up onto this component. 更多...
 
virtual bool CanEditSimulatePhysics ()
 Determines whether or not the simulate physics setting can be edited interactively on this component
 
void ClearMoveIgnoreActors ()
 Clear the list of actors we ignore when moving.
 
void ClearMoveIgnoreComponents ()
 Clear the list of components we ignore when moving.
 
bool ComponentOverlapComponent (class UPrimitiveComponent *PrimComp, const FVector Pos, const FQuat &Rot, const FCollisionQueryParams &Params)
 Test the collision of the supplied component at the supplied location/rotation, and determine if it overlaps this component. 更多...
 
bool ComponentOverlapMulti (TArray< struct FOverlapResult > &OutOverlaps, const class UWorld *InWorld, const FVector &Pos, const FQuat &Rot, ECollisionChannel TestChannel, const struct FComponentQueryParams &Params=FComponentQueryParams::DefaultComponentQueryParams, const struct FCollisionObjectQueryParams &ObjectQueryParams=FCollisionObjectQueryParams::DefaultObjectQueryParam) const
 Test the collision of the supplied component at the supplied location/rotation, and determine the set of components that it overlaps. 更多...
 
virtual bool ComputePenetration (FMTDResult &OutMTD, const FCollisionShape &CollisionShape, const FVector &Pos, const FQuat &Rot)
 Computes the minimum translation direction (MTD) when an overlap exists between the component and the given shape. 更多...
 
TArray< AActor * > CopyArrayOfMoveIgnoreActors ()
 Returns the list of actors we currently ignore when moving.
 
TArray< UPrimitiveComponent * > CopyArrayOfMoveIgnoreComponents ()
 Returns the list of actors we currently ignore when moving.
 
virtual class UMaterialInstanceDynamic * CreateAndSetMaterialInstanceDynamic (int32 ElementIndex)
 Creates a Dynamic Material Instance for the specified element index. 更多...
 
virtual class UMaterialInstanceDynamic * CreateAndSetMaterialInstanceDynamicFromMaterial (int32 ElementIndex, class UMaterialInterface *Parent)
 Creates a Dynamic Material Instance for the specified element index. 更多...
 
virtual class UMaterialInstanceDynamic * CreateDynamicMaterialInstance (int32 ElementIndex, class UMaterialInterface *SourceMaterial=NULL, FName OptionalName=NAME_None)
 Creates a Dynamic Material Instance for the specified element index, optionally from the supplied material. 更多...
 
virtual void CreateRenderState_Concurrent (FRegisterComponentContext *Context) override
 Used to create any rendering thread information for this component 更多...
 
virtual FPrimitiveSceneProxy * CreateSceneProxy ()
 Creates a proxy to represent the primitive to the scene manager in the rendering thread. 更多...
 
virtual void DestroyRenderState_Concurrent () override
 Used to shut down any rendering thread structure for this component 更多...
 
void DispatchBlockingHit (AActor &OutOwner, FHitResult const &BlockingHit)
 Dispatch notifications for the given HitResult. 更多...
 
void DispatchWakeEvents (ESleepEvent WakeEvent, FName BoneName)
 Dispatch notification for wake events and propagate to any welded bodies
 
virtual bool DoCustomNavigableGeometryExport (FNavigableGeometryExport &GeomExport) const
 Collects custom navigable geometry of component. 更多...
 
void EndComponentOverlap (const FOverlapInfo &OtherOverlap, bool bDoNotifies=true, bool bSkipNotifySelf=false)
 Finish tracking an overlap interaction that is no longer occurring between this component and the component specified. 更多...
 
virtual void FinishDestroy () override
 Called to finish destroying the object. 更多...
 
virtual float GetAngularDamping () const
 Returns the angular damping of this component.
 
virtual FBodyInstance * GetBodyInstance (FName BoneName=NAME_None, bool bGetWelded=true) const
 Returns BodyInstance of the component. 更多...
 
virtual class UBodySetup * GetBodySetup ()
 Return the BodySetup to use for this PrimitiveComponent (single body case)
 
FVector GetCenterOfMass (FName BoneName=NAME_None) const
 Get the center of mass of a single body. 更多...
 
float GetClosestPointOnCollision (const FVector &Point, FVector &OutPointOnBody, FName BoneName=NAME_None) const
 Returns the distance and closest point to the collision surface. 更多...
 
virtual ECollisionEnabled::Type GetCollisionEnabled () const override
 Returns the form of collision for this component
 
virtual ECollisionChannel GetCollisionObjectType () const override
 Gets the collision object type
 
FName GetCollisionProfileName () const
 Get the collision profile name
 
virtual ECollisionResponse GetCollisionResponseToChannel (ECollisionChannel Channel) const override
 Gets the response type given a specific channel
 
virtual const FCollisionResponseContainer & GetCollisionResponseToChannels () const override
 Return const reference to CollsionResponseContainer
 
virtual struct FCollisionShape GetCollisionShape (float Inflation=0.0f) const
 Return a CollisionShape that most closely matches this primitive.
 
virtual TStructOnScope< FActorComponentInstanceData > GetComponentInstanceData () const override
 Called before we throw away components during RerunConstructionScripts, to cache any data we wish to persist across that operation
 
virtual FTransform GetComponentTransformFromBodyInstance (FBodyInstance *UseBI)
 Called to get the Component To World Transform from the Root BodyInstance This needs to be virtual since SkeletalMeshComponent Root has to undo its own transform Without this, the root LocalToAtom is overridden by physics simulation, causing kinematic velocity to accelerate simulation 更多...
 
virtual FVector GetComponentVelocity () const override
 Get velocity of the component: either ComponentVelocity, or the velocity of the physics body if simulating physics. 更多...
 
const FCustomPrimitiveData & GetCustomPrimitiveData () const
 Get the custom primitive data for this primitive component. 更多...
 
const FCustomPrimitiveData & GetDefaultCustomPrimitiveData () const
 Get the default custom primitive data for this primitive component. 更多...
 
virtual float GetDiffuseBoost (int32 ElementIndex) const
 Gets the diffuse boost for the primitive component.
 
float GetDistanceToCollision (const FVector &Point, FVector &ClosestPointOnCollision) const
 Returns Distance to closest Body Instance surface. 更多...
 
virtual float GetEmissiveBoost (int32 ElementIndex) const
 Gets the emissive boost for the primitive component.
 
bool GetGenerateOverlapEvents () const
 If true, this component will generate overlap events when it is overlapping other components (eg Begin Overlap). 更多...
 
virtual FVector GetInertiaTensor (FName BoneName=NAME_None) const
 Returns the inertia tensor of this component in kg cm^2. 更多...
 
virtual void GetLightAndShadowMapMemoryUsage (int32 &LightMapMemoryUsage, int32 &ShadowMapMemoryUsage) const
 Returns the light and shadow map memory for this primitive in its out variables. 更多...
 
const UPrimitiveComponent * GetLightingAttachmentRoot () const
 Walks up the attachment tree until a primitive component with LightAttachmentsAsGroup enabled is found. 更多...
 
virtual bool GetLightMapResolution (int32 &Width, int32 &Height) const
 Returns the lightmap resolution used for this primitive instance in the case of it supporting texture light/ shadow maps. 更多...
 
virtual float GetLinearDamping () const
 Returns the linear damping of this component.
 
UPrimitiveComponent * GetLODParentPrimitive () const
 Gets the LOD Parent, which is used to compute visibility when hierarchical LOD is enabled
 
FMaskFilter GetMaskFilterOnBodyInstance (FMaskFilter InMaskFilter) const
 Get the mask filter checked when others move into us.
 
virtual float GetMass () const
 Returns the mass of this component in kg.
 
virtual float GetMassScale (FName BoneName=NAME_None) const
 Returns the mass scale used to calculate the mass of a single physics body
 
virtual class UMaterialInterface * GetMaterial (int32 ElementIndex) const
 Returns the material used by the element at the specified index 更多...
 
virtual UMaterialInterface * GetMaterialFromCollisionFaceIndex (int32 FaceIndex, int32 &SectionIndex) const
 Try and retrieve the material applied to a particular collision face of mesh. 更多...
 
const TArray< AActor * > & GetMoveIgnoreActors () const
 Returns the list of actors (as WeakObjectPtr) we currently ignore when moving.
 
const TArray< UPrimitiveComponent * > & GetMoveIgnoreComponents () const
 Returns the list of components we currently ignore when moving.
 
FMaskFilter GetMoveIgnoreMask () const
 Get the mask filter we use when moving.
 
virtual int32 GetNumMaterials () const
 Return number of material elements in this primitive
 
const TArray< FOverlapInfo > & GetOverlapInfos () const
 Returns list of components this component is overlapping.
 
void GetOverlappingActors (TArray< AActor * > &OverlappingActors, TSubclassOf< AActor > ClassFilter=nullptr) const
 Returns a list of actors that this component is overlapping. 更多...
 
void GetOverlappingActors (TSet< AActor * > &OverlappingActors, TSubclassOf< AActor > ClassFilter=nullptr) const
 Returns the set of actors that this component is overlapping. 更多...
 
void GetOverlappingComponents (TArray< UPrimitiveComponent * > &OutOverlappingComponents) const
 Returns unique list of components this component is overlapping.
 
void GetOverlappingComponents (TSet< UPrimitiveComponent * > &OutOverlappingComponents) const
 Returns unique set of components this component is overlapping.
 
bool GetOverlapsWithActor (const AActor *Actor, TArray< FOverlapInfo > &OutOverlaps) const
 Appends list of overlaps with components owned by the given actor to the 'OutOverlaps' array. 更多...
 
FVector GetPhysicsAngularVelocity (FName BoneName=NAME_None) const
 Get the angular velocity of a single body, in degrees per second. 更多...
 
FVector GetPhysicsAngularVelocityInDegrees (FName BoneName=NAME_None) const
 Get the angular velocity of a single body, in degrees per second. 更多...
 
FVector GetPhysicsAngularVelocityInRadians (FName BoneName=NAME_None) const
 Get the angular velocity of a single body, in radians per second. 更多...
 
FVector GetPhysicsLinearVelocity (FName BoneName=NAME_None)
 Get the linear velocity of a single body. 更多...
 
FVector GetPhysicsLinearVelocityAtPoint (FVector Point, FName BoneName=NAME_None)
 Get the linear velocity of a point on a single body. 更多...
 
virtual FMatrix GetRenderMatrix () const
 Returns the matrix that should be used to render this component. 更多...
 
virtual void GetResourceSizeEx (FResourceSizeEx &CumulativeResourceSize) override
 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). 更多...
 
bool GetRigidBodyState (FRigidBodyState &OutState, FName BoneName=NAME_None)
 Get the state of the rigid body responsible for this Actor's physics, and fill in the supplied FRigidBodyState struct based on it. 更多...
 
virtual TArray< URuntimeVirtualTexture * > const & GetRuntimeVirtualTextures () const
 Get the array of runtime virtual textures into which we render the mesh for this actor.
 
virtual bool GetShadowIndirectOnly () const
 Disable dynamic shadow casting if the primitive only casts indirect shadows, since dynamic shadows are always shadowing direct lighting
 
virtual bool GetSquaredDistanceToCollision (const FVector &Point, float &OutSquaredDistance, FVector &OutClosestPointOnCollision) const
 Returns The square of the distance to closest Body Instance surface. 更多...
 
virtual uint8 GetStaticDepthPriorityGroup () const
 Determines the DPG the primitive's primary elements are drawn in. 更多...
 
virtual ELightMapInteractionType GetStaticLightingType () const
 Requests whether the component will use texture, vertex or no lightmaps. 更多...
 
virtual int32 GetStaticLightMapResolution () const
 Returns the static lightmap resolution used for this primitive. 更多...
 
virtual void GetStreamingRenderAssetInfo (FStreamingTextureLevelContext &LevelContext, TArray< FStreamingRenderAssetPrimitiveInfo > &OutStreamingRenderAssets) const
 Enumerates the streaming textures/meshes used by the primitive. 更多...
 
void GetStreamingRenderAssetInfoWithNULLRemoval (FStreamingTextureLevelContext &LevelContext, TArray< FStreamingRenderAssetPrimitiveInfo > &OutStreamingRenderAssets) const
 Call GetStreamingRenderAssetInfo and remove the elements with a NULL texture 更多...
 
virtual void GetUsedMaterials (TArray< UMaterialInterface * > &OutMaterials, bool bGetDebugMaterials=false) const
 Retrieves the materials used in this component 更多...
 
virtual void GetUsedTextures (TArray< UTexture * > &OutTextures, EMaterialQualityLevel::Type QualityLevel)
 Returns the material textures used to render this primitive for the given platform. 更多...
 
virtual float GetVirtualTextureMainPassMaxDrawDistance () const
 Get the max draw distance to use in the main pass when also rendering to a runtime virtual texture. 更多...
 
virtual ERuntimeVirtualTextureMainPassType GetVirtualTextureRenderPassType () const
 Get the runtime virtual texture pass settings.
 
const struct FWalkableSlopeOverride & GetWalkableSlopeOverride () const
 Returns the slope override struct for this component.
 
virtual void GetWeldedBodies (TArray< FBodyInstance * > &OutWeldedBodies, TArray< FName > &OutLabels, bool bIncludingAutoWeld=false)
 Adds the bodies that are currently welded to the OutWeldedBodies array
 
FORCEINLINE EHasCustomNavigableGeometry::Type HasCustomNavigableGeometry () const
 If true then DoCustomNavigableGeometryExport will be called to collect navigable geometry of this component.
 
bool HasStaticLighting () const
 Return True if a primitive's parameters as well as its position is static during gameplay, and can thus use static lighting.
 
virtual bool HasValidPhysicsState () const override
 Used to check that DestroyPhysicsState() is working correctly
 
virtual bool HasValidSettingsForStaticLighting (bool bOverlookInvalidComponents) const
 Returns true if the component is static and has the right static mesh setup to support lightmaps.
 
void IgnoreActorWhenMoving (AActor *Actor, bool bShouldIgnore)
 Tells this component whether to ignore collision with all components of a specific Actor when this component is moved. 更多...
 
void IgnoreComponentWhenMoving (UPrimitiveComponent *Component, bool bShouldIgnore)
 Tells this component whether to ignore collision with another component when this component is moved. 更多...
 
virtual void InitSweepCollisionParams (FCollisionQueryParams &OutParams, FCollisionResponseParams &OutResponseParam) const
 Set collision params on OutParams (such as CollisionResponse) to match the settings on this PrimitiveComponent.
 
virtual void InvalidateLightingCacheDetailed (bool bInvalidateBuildEnqueuedLighting, bool bTranslationOnly) override
 Called when this actor component has moved, allowing it to discard statically cached lighting information.
 
virtual bool IsAnyRigidBodyAwake ()
 Returns if any body in this component is currently awake and simulating.
 
FORCEINLINE bool IsAttachedToStreamingManager () const
 Whether this primitive is referenced by the streaming manager and should sent callbacks when detached or destroyed
 
bool IsComponentIndividuallySelected () const
 Component is directly selected in the editor separate from its parent actor
 
virtual bool IsEditorOnly () const override
 Called during saving to determine if the object is forced to be editor only or not 更多...
 
virtual bool IsGravityEnabled () const
 Returns whether this component is affected by gravity. 更多...
 
virtual bool IsNavigationRelevant () const override
 Override to specify that a component is relevant to the navigation system
 
bool IsOverlappingActor (const AActor *Other) const
 Check whether this component is overlapping any component of the given Actor. 更多...
 
bool IsOverlappingComponent (const FOverlapInfo &Overlap) const
 Check whether this component has the specified overlap.
 
bool IsOverlappingComponent (const UPrimitiveComponent *OtherComp) const
 Check whether this component is overlapping another component. 更多...
 
virtual bool IsReadyForFinishDestroy () override
 Called to check if the object is ready for FinishDestroy. 更多...
 
virtual bool IsSimulatingPhysics (FName BoneName=NAME_None) const override
 Returns whether the specified body is currently using physics simulation
 
bool IsWelded () const
 Whether the component has been welded to another simulating component
 
virtual bool IsWorldGeometry () const override
 Is this component considered 'world' geometry, by default checks if this uses the WorldStatic collision channel
 
virtual bool IsZeroExtent () const
 This isn't bound extent, but for shape component to utilize extent is 0. 更多...
 
bool K2_BoxOverlapComponent (FVector InBoxCentre, const FBox InBox, bool bTraceComplex, bool bShowTrace, bool bPersistentShowTrace, FVector &HitLocation, FVector &HitNormal, FName &BoneName, FHitResult &OutHit)
 Perform a box overlap against a single component as an AABB (No rotation) 更多...
 
bool K2_IsCollisionEnabled () const
 Utility to see if there is any form of collision (query or physics) enabled on this component.
 
bool K2_IsPhysicsCollisionEnabled () const
 Utility to see if there is any physics collision enabled on this component.
 
bool K2_IsQueryCollisionEnabled () const
 Utility to see if there is any query collision enabled on this component.
 
bool K2_LineTraceComponent (FVector TraceStart, FVector TraceEnd, bool bTraceComplex, bool bShowTrace, bool bPersistentShowTrace, FVector &HitLocation, FVector &HitNormal, FName &BoneName, FHitResult &OutHit)
 Perform a line trace against a single component 更多...
 
bool K2_SphereOverlapComponent (FVector InSphereCentre, float InSphereRadius, bool bTraceComplex, bool bShowTrace, bool bPersistentShowTrace, FVector &HitLocation, FVector &HitNormal, FName &BoneName, FHitResult &OutHit)
 Perform a sphere overlap against a single component 更多...
 
bool K2_SphereTraceComponent (FVector TraceStart, FVector TraceEnd, float SphereRadius, bool bTraceComplex, bool bShowTrace, bool bPersistentShowTrace, FVector &HitLocation, FVector &HitNormal, FName &BoneName, FHitResult &OutHit)
 Perform a sphere trace against a single component 更多...
 
virtual bool LineTraceComponent (FHitResult &OutHit, const FVector Start, const FVector End, const FCollisionQueryParams &Params)
 Trace a ray against just this component. 更多...
 
virtual bool MoveComponentImpl (const FVector &Delta, const FQuat &NewRotation, bool bSweep, FHitResult *OutHit=NULL, EMoveComponentFlags MoveFlags=MOVECOMP_NoFlags, ETeleportType Teleport=ETeleportType::None) override
 Override this method for custom behavior for MoveComponent
 
virtual bool NeedsLoadForClient () const override
 Called during saving to determine the load flags to save with the object. 更多...
 
virtual bool NeedsLoadForServer () const override
 Called during saving to determine the load flags to save with the object. 更多...
 
virtual void OnActorEnableCollisionChanged () override
 Called on each component when the Actor's bEnableCollisionChanged flag changes
 
virtual void OnAttachmentChanged () override
 Called when AttachParent changes, to allow the scene to update its attachment state.
 
virtual void OnComponentDestroyed (bool bDestroyingHierarchy) override
 Called when a component is destroyed 更多...
 
virtual void OnCreatePhysicsState () override
 Used to create any physics engine information for this component
 
virtual void OnDestroyPhysicsState () override
 Used to shut down and physics engine structure for this component
 
virtual void OnRegister () override
 Called when a component is registered, after Scene is set, but before CreateRenderState_Concurrent or OnCreatePhysicsState are called.
 
virtual void OnUnregister () override
 Called when a component is unregistered. 更多...
 
virtual void OnUpdateTransform (EUpdateTransformFlags UpdateTransformFlags, ETeleportType Teleport=ETeleportType::None) override
 Native callback when this component is moved
 
virtual bool OverlapComponent (const FVector &Pos, const FQuat &Rot, const FCollisionShape &CollisionShape)
 Test the collision of the supplied shape at the supplied location, and determine if it overlaps this component. 更多...
 
virtual void PostDuplicate (bool bDuplicateForPIE) override
 Called after duplication & serialization and before PostLoad. 更多...
 
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. 更多...
 
void PushEditorVisibilityToProxy (uint64 InVisibility)
 Sends editor visibility updates to the render thread
 
void PushHoveredToProxy (const bool bInHovered)
 Pushes new hover state to the render thread primitive proxy 更多...
 
void PushSelectionToProxy ()
 Pushes new selection state to the render thread primitive proxy
 
virtual void PutAllRigidBodiesToSleep ()
 Force all bodies in this component to sleep.
 
void PutRigidBodyToSleep (FName BoneName=NAME_None)
 Force a single body back to sleep. 更多...
 
virtual void ReceiveComponentDamage (float DamageAmount, FDamageEvent const &DamageEvent, AController *EventInstigator, AActor *DamageCauser)
 Event called when a component is 'damaged', allowing for component class specific behaviour
 
bool RigidBodyIsAwake (FName BoneName=NAME_None) const
 Returns if a single body is currently awake and simulating. 更多...
 
virtual FVector ScaleByMomentOfInertia (FVector InputVector, FName BoneName=NAME_None) const
 Scales the given vector by the world space moment of inertia. 更多...
 
virtual void SendRenderDebugPhysics (FPrimitiveSceneProxy *OverrideSceneProxy=nullptr)
 Updates the renderer with the center of mass data
 
virtual void SendRenderTransform_Concurrent () override
 Called to send a transform update for this component to the rendering thread 更多...
 
virtual void Serialize (FArchive &Ar) override
 Handles reading, writing, and reference collecting using FArchive. 更多...
 
virtual void SetAllMassScale (float InMassScale=1.f)
 Change the mass scale used fo all bodies in this component
 
void SetAllPhysicsAngularVelocityInDegrees (const FVector &NewAngVel, bool bAddToCurrent=false)
 Set the angular velocity of all bodies in this component. 更多...
 
virtual void SetAllPhysicsAngularVelocityInRadians (const FVector &NewAngVel, bool bAddToCurrent=false)
 Set the angular velocity of all bodies in this component. 更多...
 
virtual void SetAllPhysicsLinearVelocity (FVector NewVel, bool bAddToCurrent=false)
 Set the linear velocity of all bodies in this component. 更多...
 
virtual void SetAllPhysicsPosition (FVector NewPos)
 Set the position of all bodies in this component. 更多...
 
virtual void SetAllPhysicsRotation (const FQuat &NewRot)
 Set the rotation of all bodies in this component. 更多...
 
virtual void SetAllPhysicsRotation (FRotator NewRot)
 Set the rotation of all bodies in this component. 更多...
 
virtual void SetAllUseCCD (bool InUseCCD)
 Set whether all bodies in this component should use Continuous Collision Detection
 
virtual void SetAngularDamping (float InDamping)
 Sets the angular damping of this component.
 
void SetBoundsScale (float NewBoundsScale=1.f)
 Scale the bounds of this object, used for frustum culling. 更多...
 
void SetCachedMaxDrawDistance (const float NewCachedMaxDrawDistance)
 Utility to cache the max draw distance based on cull distance volumes or the desired max draw distance
 
void SetCastInsetShadow (bool bInCastInsetShadow)
 Changes the value of CastInsetShadow.
 
void SetCastShadow (bool NewCastShadow)
 Changes the value of CastShadow.
 
void SetCenterOfMass (FVector CenterOfMassOffset, FName BoneName=NAME_None)
 Set the center of mass of a single body. 更多...
 
virtual void SetCollisionEnabled (ECollisionEnabled::Type NewType)
 Controls what kind of collision is enabled for this body
 
virtual void SetCollisionObjectType (ECollisionChannel Channel)
 Changes the collision channel that this object uses when it moves 更多...
 
virtual void SetCollisionProfileName (FName InCollisionProfileName, bool bUpdateOverlaps=true)
 Set Collision Profile Name This function is called by constructors when they set ProfileName This will change current CollisionProfileName to be this, and overwrite Collision Setting 更多...
 
virtual void SetCollisionResponseToAllChannels (ECollisionResponse NewResponse)
 Changes all ResponseToChannels container for this PrimitiveComponent. 更多...
 
virtual void SetCollisionResponseToChannel (ECollisionChannel Channel, ECollisionResponse NewResponse)
 Changes a member of the ResponseToChannels container for this PrimitiveComponent. 更多...
 
virtual void SetCollisionResponseToChannels (const FCollisionResponseContainer &NewReponses)
 Changes the whole ResponseToChannels container for this PrimitiveComponent. 更多...
 
virtual void SetConstraintMode (EDOFMode::Type ConstraintMode)
 Sets the constraint mode of the component. 更多...
 
void SetCullDistance (float NewCullDistance)
 Changes the value of CullDistance. 更多...
 
void SetCustomDepthStencilValue (int32 Value)
 Sets the CustomDepth stencil value (0 - 255) and marks the render state dirty.
 
void SetCustomDepthStencilWriteMask (ERendererStencilMask WriteMaskBit)
 Sets the CustomDepth stencil write mask and marks the render state dirty.
 
void SetCustomNavigableGeometry (const EHasCustomNavigableGeometry::Type InType)
 Set value of HasCustomNavigableGeometry
 
void SetCustomPrimitiveDataFloat (int32 DataIndex, float Value)
 Set custom primitive data at index DataIndex. 更多...
 
void SetCustomPrimitiveDataVector2 (int32 DataIndex, FVector2D Value)
 Set custom primitive data, two floats at once, from index DataIndex to index DataIndex + 1. 更多...
 
void SetCustomPrimitiveDataVector3 (int32 DataIndex, FVector Value)
 Set custom primitive data, three floats at once, from index DataIndex to index DataIndex + 2. 更多...
 
void SetCustomPrimitiveDataVector4 (int32 DataIndex, FVector4 Value)
 Set custom primitive data, four floats at once, from index DataIndex to index DataIndex + 3. 更多...
 
void SetDefaultCustomPrimitiveDataFloat (int32 DataIndex, float Value)
 Set default custom primitive data at index DataIndex, and marks the render state dirty
 
void SetDefaultCustomPrimitiveDataVector2 (int32 DataIndex, FVector2D Value)
 Set default custom primitive data, two floats at once, from index DataIndex to index DataIndex + 1, and marks the render state dirty
 
void SetDefaultCustomPrimitiveDataVector3 (int32 DataIndex, FVector Value)
 Set default custom primitive data, three floats at once, from index DataIndex to index DataIndex + 2, and marks the render state dirty
 
void SetDefaultCustomPrimitiveDataVector4 (int32 DataIndex, FVector4 Value)
 Set default custom primitive data, four floats at once, from index DataIndex to index DataIndex + 3, and marks the render state dirty
 
void SetDepthPriorityGroup (ESceneDepthPriorityGroup NewDepthPriorityGroup)
 Changes the value of DepthPriorityGroup. 更多...
 
virtual void SetEnableGravity (bool bGravityEnabled)
 Enables/disables whether this component is affected by gravity. 更多...
 
void SetExcludeFromLightAttachmentGroup (bool bInExcludeFromLightAttachmentGroup)
 Changes the value of ExcludeFromLightAttachmentGroup.
 
void SetGenerateOverlapEvents (bool bInGenerateOverlapEvents)
 Modifies value returned by GetGenerateOverlapEvents()
 
void SetLightAttachmentsAsGroup (bool bInLightAttachmentsAsGroup)
 Changes the value of LightAttachmentsAsGroup.
 
virtual void SetLinearDamping (float InDamping)
 Sets the linear damping of this component.
 
void SetLODParentPrimitive (UPrimitiveComponent *InLODParentPrimitive)
 Set LOD Parent component, normally associated with an ALODActor
 
void SetMaskFilterOnBodyInstance (FMaskFilter InMaskFilter)
 Set the mask filter checked when others move into us.
 
virtual void SetMassOverrideInKg (FName BoneName=NAME_None, float MassInKg=1.f, bool bOverrideMass=true)
 Override the mass (in Kg) of a single physics body. 更多...
 
virtual void SetMassScale (FName BoneName=NAME_None, float InMassScale=1.f)
 Change the mass scale used to calculate the mass of a single physics body
 
virtual void SetMaterial (int32 ElementIndex, class UMaterialInterface *Material)
 Changes the material applied to an element of the mesh. 更多...
 
virtual void SetMaterialByName (FName MaterialSlotName, class UMaterialInterface *Material)
 Changes the material applied to an element of the mesh. 更多...
 
void SetMoveIgnoreMask (FMaskFilter InMoveIgnoreMask)
 Set the mask filter we use when moving.
 
virtual void SetNotifyRigidBodyCollision (bool bNewNotifyRigidBodyCollision)
 Changes the value of bNotifyRigidBodyCollision
 
void SetOnlyOwnerSee (bool bNewOnlyOwnerSee)
 Changes the value of bOnlyOwnerSee.
 
void SetOwnerNoSee (bool bNewOwnerNoSee)
 Changes the value of bOwnerNoSee.
 
void SetPhysicsAngularVelocity (FVector NewAngVel, bool bAddToCurrent=false, FName BoneName=NAME_None)
 Set the angular velocity of a single body. 更多...
 
void SetPhysicsAngularVelocityInDegrees (FVector NewAngVel, bool bAddToCurrent=false, FName BoneName=NAME_None)
 Set the angular velocity of a single body. 更多...
 
virtual void SetPhysicsAngularVelocityInRadians (FVector NewAngVel, bool bAddToCurrent=false, FName BoneName=NAME_None)
 Set the angular velocity of a single body. 更多...
 
virtual void SetPhysicsLinearVelocity (FVector NewVel, bool bAddToCurrent=false, FName BoneName=NAME_None)
 Set the linear velocity of a single body. 更多...
 
void SetPhysicsMaxAngularVelocity (float NewMaxAngVel, bool bAddToCurrent=false, FName BoneName=NAME_None)
 Set the maximum angular velocity of a single body. 更多...
 
void SetPhysicsMaxAngularVelocityInDegrees (float NewMaxAngVel, bool bAddToCurrent=false, FName BoneName=NAME_None)
 Set the maximum angular velocity of a single body. 更多...
 
void SetPhysicsMaxAngularVelocityInRadians (float NewMaxAngVel, bool bAddToCurrent=false, FName BoneName=NAME_None)
 Set the maximum angular velocity of a single body. 更多...
 
virtual void SetPhysMaterialOverride (class UPhysicalMaterial *NewPhysMaterial)
 Changes the current PhysMaterialOverride for this component. 更多...
 
void SetReceivesDecals (bool bNewReceivesDecals)
 Changes the value of bReceivesDecals.
 
void SetRenderCustomDepth (bool bValue)
 Sets the bRenderCustomDepth property and marks the render state dirty.
 
void SetRenderInMainPass (bool bValue)
 Sets bRenderInMainPass property and marks the render state dirty.
 
void SetRigidBodyReplicatedTarget (FRigidBodyState &UpdatedState, const FName BoneName=NAME_None)
 Applies RigidBodyState only if it needs to be updated NeedsUpdate flag will be removed from UpdatedState after all velocity corrections are finished
 
virtual void SetSimulatePhysics (bool bSimulate)
 Sets whether or not a single body should use physics simulation, or should be 'fixed' (kinematic). 更多...
 
void SetSingleSampleShadowFromStationaryLights (bool bNewSingleSampleShadowFromStationaryLights)
 Changes the value of bSingleSampleShadowFromStationaryLights.
 
void SetTranslucentSortPriority (int32 NewTranslucentSortPriority)
 Changes the value of TranslucentSortPriority.
 
virtual void SetUseCCD (bool InUseCCD, FName BoneName=NAME_None)
 Set whether this component should use Continuous Collision Detection
 
void SetViewOwnerDepthPriorityGroup (bool bNewUseViewOwnerDepthPriorityGroup, ESceneDepthPriorityGroup NewViewOwnerDepthPriorityGroup)
 Changes the value of bUseViewOwnerDepthPriorityGroup and ViewOwnerDepthPriorityGroup. 更多...
 
virtual void SetWalkableSlopeOverride (const FWalkableSlopeOverride &NewOverride)
 Sets a new slope override for this component instance.
 
bool ShouldComponentAddToScene () const
 Looking at various values of the component, determines if this component should be added to the scene 更多...
 
virtual bool ShouldCreatePhysicsState () const override
 Return true if CreatePhysicsState() should be called. 更多...
 
virtual bool ShouldRecreateProxyOnUpdateTransform () const
 Determines whether the proxy for this primitive type needs to be recreated whenever the primitive moves. 更多...
 
virtual bool ShouldRenderSelected () const
 Return true if the owner is selected and this component is selectable
 
virtual bool SweepComponent (FHitResult &OutHit, const FVector Start, const FVector End, const FQuat &ShapeWorldRotation, const FCollisionShape &CollisionShape, bool bTraceComplex=false)
 Trace a shape against just this component. 更多...
 
void SyncComponentToRBPhysics ()
 Move this component to match the physics rigid body pose. 更多...
 
virtual void UnWeldChildren ()
 Unwelds the children of this component. 更多...
 
virtual void UnWeldFromParent ()
 UnWelds this component from its parent component. 更多...
 
virtual bool UpdateOverlapsImpl (const TOverlapArrayView *NewPendingOverlaps=nullptr, bool bDoNotifies=true, const TOverlapArrayView *OverlapsAtEndLocation=nullptr) override
 Queries world and updates overlap tracking state for this component. 更多...
 
virtual void UpdatePhysicsVolume (bool bTriggerNotifiers) override
 Update current physics volume for this component, if bShouldUpdatePhysicsVolume is true. 更多...
 
 UPrimitiveComponent (const FObjectInitializer &ObjectInitializer=FObjectInitializer::Get())
 Default UObject constructor.
 
virtual bool UsesOnlyUnlitMaterials () const
 Returns true if only unlit materials are used for rendering, false otherwise.
 
virtual void WakeAllRigidBodies ()
 Ensure simulation is running for all bodies in this component.
 
virtual void WakeRigidBody (FName BoneName=NAME_None)
 'Wake' physics simulation for a single body. 更多...
 
bool WasRecentlyRendered (float Tolerance=0.2) const
 Returns true if this component has been rendered "recently", with a tolerance in seconds to define what "recent" means. 更多...
 
virtual void WeldTo (class USceneComponent *InParent, FName InSocketName=NAME_None)
 Welds this component to another scene component, optionally at a named socket. 更多...
 
virtual bool WeldToImplementation (USceneComponent *InParent, FName ParentSocketName=NAME_None, bool bWeldSimulatedChild=true)
 Does the actual work for welding. 更多...
 
- Public 成员函数 继承自 USceneComponent
virtual void ApplyWorldOffset (const FVector &InOffset, bool bWorldShift) override
 Called by owner actor on position shifting Component should update all relevant data structures to reflect new actor location 更多...
 
bool AttachToComponent (USceneComponent *InParent, const FAttachmentTransformRules &AttachmentRules, FName InSocketName=NAME_None)
 Attach this component to another scene component, optionally at a named socket. 更多...
 
virtual void BeginDestroy () override
 Called before destroying the object. 更多...
 
virtual void CalcBoundingCylinder (float &CylinderRadius, float &CylinderHalfHeight) const
 Calculate the axis-aligned bounding cylinder of the component (radius in X-Y, half-height along Z axis). 更多...
 
virtual FBoxSphereBounds CalcBounds (const FTransform &LocalToWorld) const
 Calculate the bounds of the component. 更多...
 
virtual FBoxSphereBounds CalcLocalBounds () const
 Calculate the local bounds of the component. 更多...
 
virtual bool CanAttachAsChild (USceneComponent *ChildComponent, FName SocketName) const
 Called to see if it's possible to attach another scene component as a child. 更多...
 
bool CanEverRender () const
 return true if it can ever render
 
virtual const bool CanHaveStaticMobility () const
 Determines whether or not the component can have its mobility set to static
 
void ClearSkipUpdateOverlaps ()
 Clears the skip update overlaps flag. 更多...
 
void ConditionalUpdateComponentToWorld ()
 Call UpdateComponentToWorld if bComponentToWorldUpdated is false.
 
virtual void DestroyComponent (bool bPromoteChildren=false) override
 Unregister the component, remove it from its outer Actor's Components array and mark for pending kill.
 
virtual void DetachFromComponent (const FDetachmentTransformRules &DetachmentRules)
 Detach this component from whatever it is attached to. 更多...
 
virtual void DetachFromParent (bool bMaintainWorldPosition=false, bool bCallModify=true)
 DEPRECATED - Use DetachFromComponent() instead
 
virtual bool DoesSocketExist (FName InSocketName) const
 Return true if socket with the given name exists 更多...
 
TArray< FName > GetAllSocketNames () const
 Gets the names of all the sockets on the component. 更多...
 
const TArray< USceneComponent * > & GetAttachChildren () const
 Get the SceneComponents that are attached to this component.
 
USceneComponent * GetAttachmentRoot () const
 Walks up the attachment chain from this SceneComponent and returns the SceneComponent at the top. 更多...
 
AActor * GetAttachmentRootActor () const
 Walks up the attachment chain from this SceneComponent and returns the top-level actor it's attached to. 更多...
 
USceneComponent * GetAttachParent () const
 Get the SceneComponent we are attached to.
 
FName GetAttachSocketName () const
 Get the socket we are attached to.
 
USceneComponent * GetChildComponent (int32 ChildIndex) const
 Gets the attached child component at the specified location
 
void GetChildrenComponents (bool bIncludeAllDescendants, TArray< USceneComponent * > &Children) const
 Gets all components that are attached to this component, possibly recursively 更多...
 
virtual ECollisionEnabled::Type GetCollisionEnabled () const
 Returns the form of collision for this component
 
virtual ECollisionChannel GetCollisionObjectType () const
 Returns the channel that this component belongs to when it moves.
 
virtual ECollisionResponse GetCollisionResponseToChannel (ECollisionChannel Channel) const
 Returns the response that this component has to a specific collision channel.
 
virtual const FCollisionResponseContainer & GetCollisionResponseToChannels () const
 Return const reference to CollsionResponseContainer
 
ECollisionResponse GetCollisionResponseToComponent (USceneComponent *OtherComponent) const
 Compares the CollisionObjectType of each component against the Response of the other, to see what kind of response we should generate
 
virtual TStructOnScope< FActorComponentInstanceData > GetComponentInstanceData () const override
 Called before we throw away components during RerunConstructionScripts, to cache any data we wish to persist across that operation
 
FORCEINLINE FVector GetComponentLocation () const
 Return location of the component, in world space
 
FORCEINLINE FQuat GetComponentQuat () const
 Return rotation quaternion of the component, in world space
 
FORCEINLINE FRotator GetComponentRotation () const
 Return rotation of the component, in world space
 
FORCEINLINE FVector GetComponentScale () const
 Return scale of the component, in world space
 
FORCEINLINE const FTransform & GetComponentToWorld () const
 Get the current component-to-world transform for this component TODO: probably deprecate this in favor of GetComponentTransform
 
FORCEINLINE const FTransform & GetComponentTransform () const
 Get the current component-to-world transform for this component
 
virtual FVector GetComponentVelocity () const
 Get velocity of the component: either ComponentVelocity, or the velocity of the physics body if simulating physics. 更多...
 
class FScopedMovementUpdate * GetCurrentScopedMovement () const
 Returns the current scoped movement update, or NULL if there is none. 更多...
 
FVector GetForwardVector () const
 Get the forward (X) unit direction vector from this component, in world space. 更多...
 
virtual void GetLifetimeReplicatedProps (TArray< FLifetimeProperty > &OutLifetimeProps) const override
 Returns properties that are replicated for the lifetime of the actor channel
 
int32 GetNumChildrenComponents () const
 Gets the number of attached children components
 
void GetParentComponents (TArray< USceneComponent * > &Parents) const
 Gets all attachment parent components up to and including the root component
 
APhysicsVolume * GetPhysicsVolume () const
 Get the PhysicsVolume overlapping this component.
 
virtual FBoxSphereBounds GetPlacementExtent () const
 Get the extent used when placing this component in the editor, used for 'pulling back' hit.
 
FVector GetRelativeLocation () const
 Gets the literal value of RelativeLocation. 更多...
 
FVector & GetRelativeLocation_DirectMutable ()
 Gets a refence to RelativeLocation with the expectation that it will be modified. 更多...
 
FRotator GetRelativeRotation () const
 Gets the literal value of RelativeRotation. 更多...
 
FRotator & GetRelativeRotation_DirectMutable ()
 Gets a refence to RelativeRotation with the expectation that it will be modified. 更多...
 
FORCEINLINE const FRotationConversionCache & GetRelativeRotationCache () const
 Get the RelativeRotationCache. 更多...
 
FQuat GetRelativeRotationFromWorld (const FQuat &WorldRotation)
 Convenience function to get the relative rotation from the passed in world rotation 更多...
 
FVector GetRelativeScale3D () const
 Gets the literal value of RelativeScale3D. 更多...
 
FVector & GetRelativeScale3D_DirectMutable ()
 Gets a refence to RelativeRotation with the expectation that it will be modified. 更多...
 
FTransform GetRelativeTransform () const
 Returns the transform of the component relative to its parent
 
FVector GetRightVector () const
 Get the right (Y) unit direction vector from this component, in world space. 更多...
 
bool GetShouldUpdatePhysicsVolume () const
 Gets whether or not the cached PhysicsVolume this component overlaps should be updated when the component is moved.
 
virtual FVector GetSocketLocation (FName InSocketName) const
 Get world-space socket or bone location. 更多...
 
virtual FQuat GetSocketQuaternion (FName InSocketName) const
 Get world-space socket or bone FQuat rotation. 更多...
 
virtual FRotator GetSocketRotation (FName InSocketName) const
 Get world-space socket or bone FRotator rotation. 更多...
 
virtual FTransform GetSocketTransform (FName InSocketName, ERelativeTransformSpace TransformSpace=RTS_World) const
 Get world-space socket transform. 更多...
 
void GetSocketWorldLocationAndRotation (FName InSocketName, FVector &OutLocation, FRotator &OutRotation) const
 Find the world-space location and rotation of the given named socket. 更多...
 
FVector GetUpVector () const
 Get the up (Z) unit direction vector from this component, in world space. 更多...
 
bool GetVisibleFlag () const
 Gets the literal value of bVisible. 更多...
 
virtual bool HasAnySockets () const
 Returns true if this component has any sockets
 
virtual bool IsAnySimulatingPhysics () const
 Returns whether the specified body is currently using physics simulation
 
bool IsAttachedTo (const USceneComponent *TestComp) const
 Walks up the attachment chain to see if this component is attached to the supplied component. 更多...
 
FORCEINLINE_DEBUGGABLE bool IsCollisionEnabled () const
 Utility to see if there is any form of collision (query or physics) enabled on this component.
 
bool IsDeferringMovementUpdates () const
 Returns true if movement is currently within the scope of an FScopedMovementUpdate.
 
FORCEINLINE_DEBUGGABLE bool IsPhysicsCollisionEnabled () const
 Utility to see if there is any physics collision enabled on this component.
 
virtual bool IsPostLoadThreadSafe () const override
 Called during async load to determine if PostLoad can be called on the loading thread. 更多...
 
virtual bool IsPrecomputedLightingValid () const
 True if our precomputed lighting is up to date
 
FORCEINLINE_DEBUGGABLE bool IsQueryCollisionEnabled () const
 Utility to see if there is any query collision enabled on this component.
 
virtual bool IsSimulatingPhysics (FName BoneName=NAME_None) const
 Returns whether the specified body is currently using physics simulation
 
bool IsUsingAbsoluteLocation () const
 Gets the literal value of bAbsoluteLocation. 更多...
 
bool IsUsingAbsoluteRotation () const
 Gets the literal value of bAbsoluteRotation. 更多...
 
bool IsUsingAbsoluteScale () const
 Gets the literal value of bAbsoluteScale. 更多...
 
virtual bool IsVisible () const
 Returns true if this component is visible in the current context
 
virtual bool IsVisibleInEditor () const
 Return true if visible in editor
 
virtual bool IsWorldGeometry () const
 Is this component considered 'world' geometry, by default checks if this uses the WorldStatic collision channel
 
void K2_AddLocalOffset (FVector DeltaLocation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the location of the component in its local reference frame 更多...
 
void K2_AddLocalRotation (FRotator DeltaRotation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the rotation of the component in its local reference frame 更多...
 
void K2_AddLocalTransform (const FTransform &DeltaTransform, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the transform of the component in its local reference frame. 更多...
 
void K2_AddRelativeLocation (FVector DeltaLocation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the translation of the component relative to its parent 更多...
 
void K2_AddRelativeRotation (FRotator DeltaRotation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta the rotation of the component relative to its parent 更多...
 
void K2_AddWorldOffset (FVector DeltaLocation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the location of the component in world space. 更多...
 
void K2_AddWorldRotation (FRotator DeltaRotation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the rotation of the component in world space. 更多...
 
void K2_AddWorldTransform (const FTransform &DeltaTransform, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the transform of the component in world space. 更多...
 
void K2_AddWorldTransformKeepScale (const FTransform &DeltaTransform, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the transform of the component in world space. 更多...
 
bool K2_AttachTo (USceneComponent *InParent, FName InSocketName=NAME_None, EAttachLocation::Type AttachType=EAttachLocation::KeepRelativeOffset, bool bWeldSimulatedBodies=true)
 DEPRECATED - Use AttachToComponent() instead
 
bool K2_AttachToComponent (USceneComponent *Parent, FName SocketName, EAttachmentRule LocationRule, EAttachmentRule RotationRule, EAttachmentRule ScaleRule, bool bWeldSimulatedBodies)
 Attach this component to another scene component, optionally at a named socket. 更多...
 
void K2_DetachFromComponent (EDetachmentRule LocationRule=EDetachmentRule::KeepRelative, EDetachmentRule RotationRule=EDetachmentRule::KeepRelative, EDetachmentRule ScaleRule=EDetachmentRule::KeepRelative, bool bCallModify=true)
 Detach this component from whatever it is attached to. 更多...
 
FVector K2_GetComponentLocation () const
 Return location of the component, in world space
 
FRotator K2_GetComponentRotation () const
 Returns rotation of the component, in world space.
 
FVector K2_GetComponentScale () const
 Returns scale of the component, in world space.
 
FTransform K2_GetComponentToWorld () const
 Get the current component-to-world transform for this component
 
void K2_SetRelativeLocation (FVector NewLocation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Set the location of the component relative to its parent 更多...
 
void K2_SetRelativeLocationAndRotation (FVector NewLocation, FRotator NewRotation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Set the location and rotation of the component relative to its parent 更多...
 
void K2_SetRelativeRotation (FRotator NewRotation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Set the rotation of the component relative to its parent 更多...
 
void K2_SetRelativeTransform (const FTransform &NewTransform, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Set the transform of the component relative to its parent 更多...
 
void K2_SetWorldLocation (FVector NewLocation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Put this component at the specified location in world space. 更多...
 
void K2_SetWorldLocationAndRotation (FVector NewLocation, FRotator NewRotation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Set the relative location and rotation of the component to put it at the supplied pose in world space. 更多...
 
void K2_SetWorldTransform (const FTransform &NewTransform, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Set the transform of the component in world space. 更多...
 
bool MoveComponent (const FVector &Delta, const FQuat &NewRotation, bool bSweep, FHitResult *Hit=NULL, EMoveComponentFlags MoveFlags=MOVECOMP_NoFlags, ETeleportType Teleport=ETeleportType::None)
 Tries to move the component by a movement vector (Delta) and sets rotation to NewRotation. 更多...
 
virtual void OnAttachmentChanged ()
 Called when AttachParent changes, to allow the scene to update its attachment state.
 
virtual void OnComponentDestroyed (bool bDestroyingHierarchy) override
 Called when a component is destroyed 更多...
 
virtual void OnRegister () override
 Called when a component is registered, after Scene is set, but before CreateRenderState_Concurrent or OnCreatePhysicsState are called.
 
virtual void OnUnregister () override
 Called when a component is unregistered. 更多...
 
virtual void PostInterpChange (FProperty *PropertyThatChanged) override
 This is called when property is modified by InterpPropertyTracks 更多...
 
virtual void PostNetReceive () override
 Called right after receiving a bunch
 
virtual void PostRepNotifies () override
 Called right after calling all OnRep notifies (called even when there are no notifies)
 
virtual void PreNetReceive () override
 Called right before receiving a bunch
 
virtual void PropagateLightingScenarioChange ()
 Updates any visuals after the lighting has changed
 
virtual void QuerySupportedSockets (TArray< FComponentSocketDescription > &OutSockets) const
 Get a list of sockets this component contains
 
void ResetRelativeTransform ()
 Reset the transform of the component relative to its parent. 更多...
 
void SetAbsolute (bool bNewAbsoluteLocation=false, bool bNewAbsoluteRotation=false, bool bNewAbsoluteScale=false)
 Set which parts of the relative transform should be relative to parent, and which should be relative to world
 
FORCEINLINE void SetComponentToWorld (const FTransform &NewComponentToWorld)
 Sets the cached component to world directly. 更多...
 
void SetHiddenInGame (bool NewHidden, bool bPropagateToChildren=false)
 Changes the value of bHiddenInGame, if false this will disable Visibility during gameplay
 
virtual void SetMobility (EComponentMobility::Type NewMobility)
 Set how often this component is allowed to move during runtime. 更多...
 
void SetPhysicsVolume (APhysicsVolume *NewVolume, bool bTriggerNotifiers)
 Replace current PhysicsVolume to input NewVolume 更多...
 
void SetRelativeLocation_Direct (const FVector NewRelativeLocation)
 Sets the value of RelativeLocation without causing other side effects to this instance. 更多...
 
void SetRelativeRotation_Direct (const FRotator NewRelativeRotation)
 Sets the value of RelativeRotation without causing other side effects to this instance. 更多...
 
void SetRelativeRotationCache (const FRotationConversionCache &InCache)
 Sets the RelativeRotationCache. 更多...
 
void SetRelativeRotationExact (FRotator NewRotation, bool bSweep=false, FHitResult *OutSweepHitResult=nullptr, ETeleportType Teleport=ETeleportType::None)
 Set the rotation of the component relative to its parent and force RelativeRotation to be equal to new rotation. 更多...
 
void SetRelativeScale3D (FVector NewScale3D)
 Set the non-uniform scale of the component relative to its parent
 
void SetRelativeScale3D_Direct (const FVector NewRelativeScale3D)
 Sets the value of RelativeScale3D without causing other side effects to this instance. 更多...
 
void SetRelativeTransform_Direct (const FTransform &NewRelativeTransform)
 Helper function to set the location, rotation, and scale without causing other side effects to this instance. 更多...
 
void SetShouldUpdatePhysicsVolume (bool bInShouldUpdatePhysicsVolume)
 Sets whether or not the cached PhysicsVolume this component overlaps should be updated when the component is moved.
 
void SetupAttachment (USceneComponent *InParent, FName InSocketName=NAME_None)
 Initializes desired Attach Parent and SocketName to be attached to when the component is registered. 更多...
 
void SetUsingAbsoluteLocation (const bool bInAbsoluteLocation)
 Sets the value of bAbsoluteLocation without causing other side effects to this instance.
 
void SetUsingAbsoluteRotation (const bool bInAbsoluteRotation)
 Sets the value of bAbsoluteRotation without causing other side effects to this instance.
 
void SetUsingAbsoluteScale (const bool bInAbsoluteRotation)
 Sets the value of bAbsoluteScale without causing other side effects to this instance.
 
void SetVisibility (bool bNewVisibility, bool bPropagateToChildren=false)
 Set visibility of the component, if during game use this to turn on/off
 
void SetVisibleFlag (const bool bInVisible)
 Sets the value of bVisible without causing other side effects to this instance. 更多...
 
void SetWorldLocationAndRotation (FVector NewLocation, const FQuat &NewRotation, bool bSweep=false, FHitResult *OutSweepHitResult=nullptr, ETeleportType Teleport=ETeleportType::None)
 Set the relative location and FQuat rotation of the component to put it at the supplied pose in world space.
 
void SetWorldLocationAndRotationNoPhysics (const FVector &NewLocation, const FRotator &NewRotation)
 Special version of SetWorldLocationAndRotation that does not affect physics.
 
void SetWorldScale3D (FVector NewScale)
 Set the relative scale of the component to put it at the supplied scale in world space. 更多...
 
virtual bool ShouldCollideWhenPlacing () const
 If true, bounds should be used when placing component/actor in level. 更多...
 
bool ShouldComponentAddToScene () const
 Looking at various values of the component, determines if this component should be added to the scene 更多...
 
virtual bool ShouldCreateRenderState () const override
 Return true if CreateRenderState() should be called
 
bool ShouldRender () const
 return true if it should render
 
bool ShouldSkipUpdateOverlaps () const
 If true, we can use the old computed overlaps
 
bool SnapTo (USceneComponent *InParent, FName InSocketName=NAME_None)
 DEPRECATED - Use AttachToComponent() instead
 
void ToggleVisibility (bool bPropagateToChildren=false)
 Toggle visibility of the component
 
virtual void UpdateBounds ()
 Update the Bounds of the component.
 
void UpdateChildTransforms (EUpdateTransformFlags UpdateTransformFlags=EUpdateTransformFlags::None, ETeleportType Teleport=ETeleportType::None)
 Update transforms of any components attached to this one.
 
virtual void UpdateComponentToWorld (EUpdateTransformFlags UpdateTransformFlags=EUpdateTransformFlags::None, ETeleportType Teleport=ETeleportType::None) override final
 Recalculate the value of our component to world transform
 
bool UpdateOverlaps (const TOverlapArrayView *PendingOverlaps=nullptr, bool bDoNotifies=true, const TOverlapArrayView *OverlapsAtEndLocation=nullptr)
 Queries world and updates overlap tracking state for this component
 
virtual void UpdatePhysicsVolume (bool bTriggerNotifiers)
 Updates the PhysicsVolume of this SceneComponent, if bShouldUpdatePhysicsVolume is true. 更多...
 
 USceneComponent (const FObjectInitializer &ObjectInitializer=FObjectInitializer::Get())
 UObject constructor that takes an optional ObjectInitializer
 
- Public 成员函数 继承自 UActorComponent
virtual void Activate (bool bReset=false)
 Activates the SceneComponent, should be overridden by native child classes. 更多...
 
virtual UObject const * AdditionalStatObject () const
 Give a readable name for this component, including asset name if applicable
 
virtual void AddTickPrerequisiteActor (AActor *PrerequisiteActor)
 Make this component tick after PrerequisiteActor
 
virtual void AddTickPrerequisiteComponent (UActorComponent *PrerequisiteComponent)
 Make this component tick after PrerequisiteComponent.
 
FORCEINLINE bool AllowReregistration () const
 Check whether the component class allows reregistration during ReregisterAllComponents
 
virtual void ApplyWorldOffset (const FVector &InOffset, bool bWorldShift)
 Called by owner actor on position shifting Component should update all relevant data structures to reflect new actor location 更多...
 
virtual void BeginDestroy () override
 Called before destroying the object. 更多...
 
virtual void BeginPlay ()
 Begins Play for the component. 更多...
 
virtual bool CallRemoteFunction (UFunction *Function, void *Parameters, FOutParmRec *OutParms, FFrame *Stack) override
 Call the actor's function remotely 更多...
 
bool CanEverAffectNavigation () const
 Can this component potentially influence navigation
 
void ClearNeedEndOfFrameUpdate ()
 If we belong to a world, clear the request to do a deferred update.
 
bool ComponentHasTag (FName Tag) const
 See if this component contains the supplied tag
 
bool ComponentIsInLevel (const class ULevel *TestLevel) const
 Returns true if this actor is contained by TestLevel.
 
bool ComponentIsInPersistentLevel (bool bIncludeLevelStreamingPersistent) const
 See if this component is in the persistent level
 
void CreatePhysicsState (bool bAllowDeferral=false)
 Create any physics engine information for this component
 
virtual void Deactivate ()
 Deactivates the SceneComponent.
 
virtual void DestroyComponent (bool bPromoteChildren=false)
 Unregister the component, remove it from its outer Actor's Components array and mark for pending kill.
 
void DestroyPhysicsState ()
 Shut down any physics engine structure for this component
 
void DetermineUCSModifiedProperties ()
 Initializes the list of properties that are modified by the UserConstructionScript
 
void DoDeferredRenderUpdates_Concurrent ()
 Uses the bRenderStateDirty/bRenderTransformDirty to perform any necessary work on this component. 更多...
 
virtual void EndPlay (const EEndPlayReason::Type EndPlayReason)
 Ends gameplay for this component. 更多...
 
virtual bool GetComponentClassCanReplicate () const
 Returns true if this type of component can ever replicate, override to disable the default behavior
 
virtual TStructOnScope< FActorComponentInstanceData > GetComponentInstanceData () const
 Called before we throw away components during RerunConstructionScripts, to cache any data we wish to persist across that operation
 
ULevel * GetComponentLevel () const
 Return the ULevel that this Component is part of.
 
float GetComponentTickInterval () const
 Returns the tick interval for this component's primary tick function, which is the frequency in seconds at which it will be executed
 
virtual int32 GetFunctionCallspace (UFunction *Function, FFrame *Stack) override
 Return the space this function should be called. 更多...
 
FORCEINLINE bool GetIsReplicated () const
 Returns whether replication is enabled or not.
 
virtual void GetLifetimeReplicatedProps (TArray< FLifetimeProperty > &OutLifetimeProps) const override
 Returns properties that are replicated for the lifetime of the actor channel
 
uint32 GetMarkedForEndOfFrameUpdateState () const
 Tracks whether the component has been added to one of the world's end of frame update lists
 
uint32 GetMarkedForPreEndOfFrameSync () const
 Tracks whether the component has been added to one of the world's end of frame update lists
 
ENetMode GetNetMode () const
 Get the network mode (dedicated server, client, standalone, etc) for this component. 更多...
 
AActor * GetOwner () const
 Follow the Outer chain to get the AActor that 'Owns' this component
 
template<class T >
T * GetOwner () const
 Templated version of GetOwner(), will return nullptr if cast fails
 
ENetRole GetOwnerRole () const
 Get the network role of the Owner, or ROLE_None if there is no owner.
 
virtual FString GetReadableName () const
 Returns a readable name for this component, including the asset name if applicable By default this appends a space plus AdditionalStatObject()
 
class FSceneInterface * GetScene () const
 Returns the rendering scene associated with this component
 
void GetUCSModifiedProperties (TSet< const FProperty * > &ModifiedProperties) const
 Returns the list of properties that are modified by the UserConstructionScript
 
int32 GetUCSSerializationIndex () const
 Returns the UCS serialization index. 更多...
 
virtual UWorld * GetWorld () const override final
 Getter for the cached world pointer, will return null if the component is not actually spawned in a level
 
bool HasBeenCreated () const
 Indicates that OnCreatedComponent has been called, but OnDestroyedComponent has not yet
 
bool HasBeenInitialized () const
 Indicates that InitializeComponent has been called, but UninitializeComponent has not yet
 
bool HasBegunPlay () const
 Indicates that BeginPlay has been called, but EndPlay has not yet
 
virtual void InitializeComponent ()
 Initializes the component. 更多...
 
void InvalidateLightingCache ()
 Invalidate lighting cache with default options.
 
virtual void InvalidateLightingCacheDetailed (bool bInvalidateBuildEnqueuedLighting, bool bTranslationOnly)
 Called when this actor component has moved, allowing it to discard statically cached lighting information.
 
bool IsActive () const
 Returns whether the component is active or not 更多...
 
bool IsBeingDestroyed () const
 Returns whether the component is in the process of being destroyed.
 
virtual bool IsComponentTickEnabled () const
 Returns whether this component has tick enabled or not
 
bool IsCreatedByConstructionScript () const
 Returns true if instances of this component are created by either the user or simple construction script
 
bool IsEditableWhenInherited () const
 True if this component can be modified when it was inherited from a parent actor class
 
virtual bool IsNameStableForNetworking () const override
 IsNameStableForNetworking means an object can be referred to its path name (relative to outer) over the network
 
virtual bool IsNavigationRelevant () const
 Override to specify that a component is relevant to the navigation system
 
bool IsNetMode (ENetMode Mode) const
 Test whether net mode is the given mode. 更多...
 
bool IsNetSimulating () const
 Returns true if we are replicating and this client is not authoritative
 
bool IsNetStartupComponent () const
 Returns true if this component was owned by a net startup actor during level load.
 
bool IsOwnerRunningUserConstructionScript () const
 See if the owning Actor is currently running the UCS
 
bool IsOwnerSelected () const
 Returns whether the component's owner is selected in the editor
 
bool IsPhysicsStateCreated () const
 Returns true if the physics 'state' (e.g. 更多...
 
virtual bool IsReadyForOwnerToAutoDestroy () const
 Overridable check for a component to indicate to its Owner that it should prevent the Actor from auto destroying when finished
 
FORCEINLINE bool IsRegistered () const
 See if this component is currently registered
 
bool IsRenderStateCreated () const
 Returns true if the render 'state' (e.g. 更多...
 
bool IsRenderStateDirty () const
 Is this component in need of its whole state being sent to the renderer?
 
bool IsRenderTransformDirty () const
 Is this component's transform in need of sending to the renderer?
 
virtual bool IsSupportedForNetworking () const override
 IsSupportedForNetworking means an object can be referenced over the network
 
void K2_DestroyComponent (UObject *Object)
 Unregister and mark for pending kill a component. 更多...
 
void MarkForNeededEndOfFrameRecreate ()
 If we belong to a world, mark this for a deferred update, otherwise do it now.
 
void MarkForNeededEndOfFrameUpdate ()
 If we belong to a world, mark this for a deferred update, otherwise do it now.
 
void MarkRenderDynamicDataDirty ()
 Indicate that dynamic data for this component needs to be sent at the end of the frame.
 
void MarkRenderStateDirty ()
 Mark the render state as dirty - will be sent to the render thread at the end of the frame.
 
void MarkRenderTransformDirty ()
 Marks the transform as dirty - will be sent to the render thread at the end of the frame
 
virtual bool NeedsLoadForClient () const override
 Called during saving to determine the load flags to save with the object. 更多...
 
virtual bool NeedsLoadForEditorGame () const override
 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 override
 Called during saving to determine the load flags to save with the object. 更多...
 
virtual void OnActorEnableCollisionChanged ()
 Called on each component when the Actor's bEnableCollisionChanged flag changes
 
virtual void OnComponentCreated ()
 Called when a component is created (not loaded). 更多...
 
virtual void OnComponentDestroyed (bool bDestroyingHierarchy)
 Called when a component is destroyed 更多...
 
virtual void OnEndOfFrameUpdateDuringTick ()
 Allows components to handle an EOF update happening mid tick. 更多...
 
virtual void OnPreEndOfFrameSync ()
 Allows components to wait on outstanding tasks prior to sending EOF update data. 更多...
 
virtual void OnRep_IsActive ()
 Handles replication of active state, handles ticking by default but should be overridden as needed
 
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 PostRename (UObject *OldOuter, const FName OldName) override
 Called at the end of Rename(), but only if the rename was actually carried out
 
virtual void PreReplication (IRepChangedPropertyTracker &ChangedPropertyTracker)
 Called on the component right before replication occurs
 
void ReceiveBeginPlay ()
 Blueprint implementable event for when the component is beginning play, called before its owning actor's BeginPlay or when the component is dynamically created if the Actor has already BegunPlay.
 
void ReceiveEndPlay (EEndPlayReason::Type EndPlayReason)
 Blueprint implementable event for when the component ends play, generally via destruction or its Actor's EndPlay.
 
void ReceiveTick (float DeltaSeconds)
 Event called every frame if tick is enabled
 
void RecreatePhysicsState ()
 Recreate the physics state right way.
 
void RecreateRenderState_Concurrent ()
 Recreate the render state right away. 更多...
 
void RegisterAllComponentTickFunctions (bool bRegister)
 When called, will call the virtual call chain to register all of the tick functions Do not override this function or make it virtual 更多...
 
void RegisterComponent ()
 Register this component, creating any rendering/physics state. 更多...
 
void RegisterComponentWithWorld (UWorld *InWorld, FRegisterComponentContext *Context=nullptr)
 Registers a component with a specific world, which creates any visual/physical state 更多...
 
virtual void RemoveTickPrerequisiteActor (AActor *PrerequisiteActor)
 Remove tick dependency on PrerequisiteActor.
 
virtual void RemoveTickPrerequisiteComponent (UActorComponent *PrerequisiteComponent)
 Remove tick dependency on PrerequisiteComponent.
 
void RemoveUCSModifiedProperties (const TArray< FProperty * > &Properties)
 Removes specified properties from the list of UCS-modified properties
 
virtual bool Rename (const TCHAR *NewName=NULL, UObject *NewOuter=NULL, 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)
 Allows a component to replicate other subobject on the actor

 
virtual bool RequiresGameThreadEndOfFrameRecreate () const
 return true if this component requires end of frame recreates to happen from the game thread.
 
virtual bool RequiresGameThreadEndOfFrameUpdates () const
 return true if this component requires end of frame updates to happen from the game thread.
 
virtual bool RequiresPreEndOfFrameSync () const
 return true if this component needs to sync to tasks before end of frame updates are executed
 
void ReregisterComponent ()
 Unregisters and immediately re-registers component.
 
virtual void Serialize (FArchive &Ar) override
 Handles reading, writing, and reference collecting using FArchive. 更多...
 
virtual void SetActive (bool bNewActive, bool bReset=false)
 Sets whether the component is active or not 更多...
 
void SetActiveFlag (const bool bNewIsActive)
 Sets the value of bIsActive without causing other side effects to this instance. 更多...
 
virtual void SetAutoActivate (bool bNewAutoActivate)
 Sets whether the component should be auto activate or not. 更多...
 
void SetCanEverAffectNavigation (bool bRelevant)
 set value of bCanEverAffectNavigation flag and update navigation octree if needed
 
virtual void SetComponentTickEnabled (bool bEnabled)
 Set this component's tick functions to be enabled or disabled. 更多...
 
virtual void SetComponentTickEnabledAsync (bool bEnabled)
 Spawns a task on GameThread that will call SetComponentTickEnabled 更多...
 
void SetComponentTickInterval (float TickInterval)
 Sets the tick interval for this component's primary tick function. 更多...
 
void SetComponentTickIntervalAndCooldown (float TickInterval)
 Sets the tick interval for this component's primary tick function. 更多...
 
void SetIsNetStartupComponent (const bool bInIsNetStartupComponent)
 This should only be called by the engine in ULevel::InitializeNetworkActors to initialize bIsNetStartupComponent.
 
void SetIsReplicated (bool ShouldReplicate)
 Enable or disable replication. 更多...
 
void SetNetAddressable ()
 This signifies the component can be ID'd by name over the network. 更多...
 
void SetTickableWhenPaused (bool bTickableWhenPaused)
 Sets whether this component can tick when paused.
 
void SetTickGroup (ETickingGroup NewTickGroup)
 Changes the ticking group for this component
 
bool SetupActorComponentTickFunction (struct FTickFunction *TickFunction)
 Set up a tick function for a component in the standard way. 更多...
 
virtual void TickComponent (float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction)
 Function called every frame on this ActorComponent. 更多...
 
virtual void ToggleActive ()
 Toggles the active state of the component
 
 UActorComponent (const FObjectInitializer &ObjectInitializer=FObjectInitializer::Get())
 Default UObject constructor that takes an optional ObjectInitializer.
 
virtual void UninitializeComponent ()
 Handle this component being Uninitialized. 更多...
 
void UnregisterComponent ()
 Unregister this component, destroying any rendering/physics state.
 
virtual void UpdateComponentToWorld (EUpdateTransformFlags UpdateTransformFlags=EUpdateTransformFlags::None, ETeleportType Teleport=ETeleportType::None)
 Recalculate the value of our component to world transform
 
- 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 属性

uint8 AlwaysLoadOnClient:1
 If this is True, this component must always be loaded on clients, even if Hidden and CollisionEnabled is NoCollision.
 
uint8 AlwaysLoadOnServer:1
 If this is True, this component must always be loaded on servers, even if Hidden and CollisionEnabled is NoCollision
 
FThreadSafeCounter AttachmentCounter
 Incremented by the main thread before being attached to the scene, decremented by the rendering thread after removal. 更多...
 
uint8 bAffectDistanceFieldLighting:1
 Controls whether the primitive should affect dynamic distance field lighting methods. 更多...
 
uint8 bAffectDynamicIndirectLighting:1
 Controls whether the primitive should inject light into the Light Propagation Volume. 更多...
 
uint8 bAllowCullDistanceVolume:1
 Whether to accept cull distance volumes to modify cached cull distance.
 
uint8 bAlwaysCreatePhysicsState:1
 Indicates if we'd like to create physics state all the time (for collision and simulation). 更多...
 
uint8 bApplyImpulseOnDamage: 1
 True for damage to this component to apply physics impulse, false to opt out of these impulses.
 
uint8 bAttachedToStreamingManagerAsDynamic: 1
 Whether this primitive is referenced by a FDynamicRenderAssetInstanceManager
 
uint8 bAttachedToStreamingManagerAsStatic: 1
 Whether this primitive is referenced by a FLevelRenderAssetManager

 
uint8 bBatchImpostersAsInstances: 1
 If true, the proxy generation process will use instancing to render this imposter
 
uint8 bCastCinematicShadow:1
 Whether this component should cast shadows from lights that have bCastShadowsFromCinematicObjectsOnly enabled. 更多...
 
uint8 bCastContactShadow:1
 Whether the object should cast contact shadows. 更多...
 
uint8 bCastDynamicShadow:1
 Controls whether the primitive should cast shadows in the case of non precomputed shadowing. 更多...
 
uint8 bCastFarShadow:1
 When enabled, the component will be rendering into the far shadow cascades (only for directional lights).
 
uint8 bCastHiddenShadow:1
 If true, the primitive will cast shadows even if bHidden is true. 更多...
 
uint8 bCastInsetShadow:1
 Whether this component should create a per-object shadow that gives higher effective shadow resolution. 更多...
 
uint8 bCastShadowAsTwoSided:1
 Whether this primitive should cast dynamic shadows as if it were a two sided material.
 
uint8 bCastStaticShadow:1
 Whether the object should cast a static shadow from shadow casting lights. 更多...
 
uint8 bCastVolumetricTranslucentShadow:1
 Whether the object should cast a volumetric translucent shadow. 更多...
 
uint8 bExcludeFromLightAttachmentGroup:1
 If set, then it overrides any bLightAttachmentsAsGroup set in a parent.
 
uint8 bFillCollisionUnderneathForNavmesh:1
 If set, navmesh will not be generated under the surface of the geometry
 
uint8 bForceMipStreaming:1
 If true, forces mips for textures used by this component to be resident when this component's level is loaded.
 
uint8 bHandledByStreamingManagerAsDynamic: 1
 Whether this primitive is handled as dynamic, although it could have no references
 
TEnumAsByte< EHasCustomNavigableGeometry::Type > bHasCustomNavigableGeometry
 If true then DoCustomNavigableGeometryExport will be called to collect navigable geometry of this component.
 
uint8 bHasMotionBlurVelocityMeshes:1
 True if the primitive has motion blur velocity meshes
 
uint8 bHasPerInstanceHitProxies:1
 If true a hit-proxy will be generated for each instance of instanced static meshes
 
uint8 bIgnoreRadialForce:1
 Will ignore radial forces applied to this component.
 
uint8 bIgnoreRadialImpulse:1
 Will ignore radial impulses applied to this component.
 
uint8 bIgnoreStreamingManagerUpdate: 1
 When true, texture streaming manager won't update the component state. 更多...
 
uint8 bLightAsIfStatic_DEPRECATED:1
 
uint8 bLightAttachmentsAsGroup:1
 Whether to light this component and any attachments as a group. 更多...
 
uint8 bMultiBodyOverlap:1
 If true, this component will generate individual overlaps for each overlapping physics body if it is a multi-body component. 更多...
 
uint8 bNeverDistanceCull:1
 When enabled this object will not be culled by distance. 更多...
 
FBodyInstance BodyInstance
 Physics scene information for this component, holds a single rigid body with multiple shapes.
 
uint8 bOnlyOwnerSee:1
 If this is True, this component will only be visible when the view actor is the component's owner, directly or indirectly.
 
float BoundsScale
 Scales the bounds of the object. 更多...
 
uint8 bOwnerNoSee:1
 If this is True, this component won't be visible when the view actor is the component's owner, directly or indirectly.
 
uint8 bReceiveMobileCSMShadows: 1
 Mobile only: If disabled this component will not receive CSM shadows. 更多...
 
uint8 bReceivesDecals:1
 Whether the primitive receives decals.
 
uint8 bRenderCustomDepth:1
 If true, this component will be rendered in the CustomDepth pass (usually used for outlines)
 
uint8 bRenderInDepthPass:1
 If true, this component will be rendered in the depth pass even if it's not rendered in the main pass
 
uint8 bRenderInMainPass:1
 If true, this component will be rendered in the main pass (z prepass, basepass, transparency)
 
uint8 bReplicatePhysicsToAutonomousProxy: 1
 True if physics should be replicated to autonomous proxies. 更多...
 
uint8 bReturnMaterialOnMove:1
 If true, component sweeps will return the material in their hit result. 更多...
 
uint8 bSelectable:1
 If this is True, this component can be selected in the editor.
 
uint8 bSelfShadowOnly:1
 When enabled, the component will only cast a shadow on itself and not other components in the world. 更多...
 
uint8 bSingleSampleShadowFromStationaryLights:1
 Whether the whole component should be shadowed as one from stationary lights, which makes shadow receiving much cheaper. 更多...
 
uint8 bTraceComplexOnMove:1
 If true, component sweeps with this component should trace against complex collision during movement (for example, each triangle of a mesh). 更多...
 
uint8 bTreatAsBackgroundForOcclusion:1
 Treat this primitive as part of the background for occlusion purposes. 更多...
 
uint8 bUseAsOccluder:1
 Whether to render the primitive in the depth only pass. 更多...
 
uint8 bUseEditorCompositing:1
 Composite the drawing of this component onto the scene after post processing (only applies to editor drawing)
 
uint8 bUseMaxLODAsImposter: 1
 Use the Maximum LOD Mesh (imposter) instead of including Mesh data from this component in the Proxy Generation process
 
uint8 bUseViewOwnerDepthPriorityGroup:1
 True if the primitive should be rendered using ViewOwnerDepthPriorityGroup if viewed by its owner.
 
uint8 bVisibleInRayTracing: 1
 If true, this component will be visible in ray tracing effects. 更多...
 
uint8 bVisibleInRealTimeSkyCaptures:1
 If true, this component will be visible in real-time sky light reflection captures.
 
uint8 bVisibleInReflectionCaptures:1
 If true, this component will be visible in reflection captures.
 
float CachedMaxDrawDistance
 The distance to cull this primitive at. 更多...
 
TEnumAsByte< enum ECanBeCharacterBase > CanCharacterStepUpOn
 Determine whether a Character can step up onto this component. 更多...
 
uint8 CastShadow:1
 Controls whether the primitive component should cast a shadow or not.
 
FPrimitiveComponentId ComponentId
 Used by the renderer, to identify a component across re-registers.
 
int32 CustomDepthStencilValue
 Optionally write this 0-255 value to the stencil buffer in CustomDepth pass (Requires project setting or r.CustomDepth == 3)
 
ERendererStencilMask CustomDepthStencilWriteMask
 Mask used for stencil buffer writes.
 
FPhysScene * DeferredCreatePhysicsStateScene
 If non-null, physics state creation has been deferred to ULevel::IncrementalUpdateComponents or this scene's StartFrame.
 
TEnumAsByte< enum ESceneDepthPriorityGroup > DepthPriorityGroup
 The scene depth priority group to draw the primitive in.
 
FRenderCommandFence DetachFence
 A fence to track when the primitive is detached from the scene in the rendering thread.
 
TEnumAsByte< EIndirectLightingCacheQuality > IndirectLightingCacheQuality
 Quality of indirect lighting for Movable primitives. 更多...
 
float LastSubmitTime
 Last time the component was submitted for rendering (called FScene::AddPrimitive).
 
float LDMaxDrawDistance
 Max draw distance exposed to LDs. 更多...
 
FLightingChannels LightingChannels
 Channels that this component should be in. 更多...
 
ELightmapType LightmapType
 Controls the type of lightmap used for this component.
 
float LpvBiasMultiplier
 Multiplier used to scale the Light Propagation Volume light injection bias, to reduce light bleeding. 更多...
 
float MinDrawDistance
 The minimum distance at which the primitive should be rendered, measured in world space units from the center of the primitive's bounding sphere to the camera position.
 
TArray< AActor * > MoveIgnoreActors
 Set of actors to ignore during component sweeps in MoveComponent(). 更多...
 
TArray< UPrimitiveComponent * > MoveIgnoreComponents
 Set of components to ignore during component sweeps in MoveComponent(). 更多...
 
FComponentBeginCursorOverSignature OnBeginCursorOver
 Event called when the mouse cursor is moved over this component and mouse over events are enabled in the player controller
 
FComponentOnClickedSignature OnClicked
 Event called when the left mouse button is clicked while the mouse is over this component and click events are enabled in the player controller
 
FComponentBeginOverlapSignature OnComponentBeginOverlap
 Event called when something starts to overlaps this component, for example a player walking into a trigger. 更多...
 
FComponentCollisionSettingsChangedSignature OnComponentCollisionSettingsChangedEvent
 Event called when collision settings change for this component.
 
FComponentEndOverlapSignature OnComponentEndOverlap
 Event called when something stops overlapping this component 更多...
 
FComponentHitSignature OnComponentHit
 Event called when a component hits (or is hit by) something solid. 更多...
 
FComponentSleepSignature OnComponentSleep
 Event called when the underlying physics objects is put to sleep
 
FComponentWakeSignature OnComponentWake
 Event called when the underlying physics objects is woken up
 
FComponentEndCursorOverSignature OnEndCursorOver
 Event called when the mouse cursor is moved off this component and mouse over events are enabled in the player controller
 
FComponentOnInputTouchBeginSignature OnInputTouchBegin
 Event called when a touch input is received over this component when touch events are enabled in the player controller
 
FComponentOnInputTouchEndSignature OnInputTouchEnd
 Event called when a touch input is released over this component when touch events are enabled in the player controller
 
FComponentBeginTouchOverSignature OnInputTouchEnter
 Event called when a finger is moved over this component when touch over events are enabled in the player controller
 
FComponentEndTouchOverSignature OnInputTouchLeave
 Event called when a finger is moved off this component when touch over events are enabled in the player controller
 
FComponentOnReleasedSignature OnReleased
 Event called when the left mouse button is released while the mouse is over this component click events are enabled in the player controller
 
TArray< URuntimeVirtualTexture * > RuntimeVirtualTextures
 Array of runtime virtual textures into which we draw the mesh for this actor. 更多...
 
FPrimitiveSceneProxy * SceneProxy
 The primitive's scene info.
 
int32 TranslucencySortPriority
 Translucent objects with a lower sort priority draw behind objects with a higher priority. 更多...
 
TEnumAsByte< enum ESceneDepthPriorityGroup > ViewOwnerDepthPriorityGroup
 The scene depth priority group to draw the primitive in, if it's being viewed by its owner.
 
int8 VirtualTextureCullMips = 0
 Number of lower mips in the runtime virtual texture to skip for rendering this primitive. 更多...
 
int8 VirtualTextureLodBias = 0
 Bias to the LOD selected for rendering to runtime virtual textures.
 
int8 VirtualTextureMinCoverage = 0
 Set the minimum pixel coverage before culling from the runtime virtual texture. 更多...
 
ERuntimeVirtualTextureMainPassType VirtualTextureRenderPassType = ERuntimeVirtualTextureMainPassType::Exclusive
 Controls if this component draws in the main pass as well as in the virtual texture.
 
int32 VisibilityId
 Used for precomputed visibility
 
- Public 属性 继承自 USceneComponent
uint8 bBoundsChangeTriggersStreamingDataRebuild:1
 If true, a change in the bounds of the component will call trigger a streaming data rebuild
 
uint8 bHiddenInGame:1
 Whether to hide the primitive in game, if the primitive is Visible.
 
FBoxSphereBounds Bounds
 Current bounds of the component
 
uint8 bUseAttachParentBound:1
 If true, this component uses its parents bounds when attached. 更多...
 
const FLevelCollection * CachedLevelCollection
 Cached level collection that contains the level this component is registered in, for fast access in IsVisible().
 
FVector ComponentVelocity
 Velocity of the component. 更多...
 
TEnumAsByte< enum EDetailMode > DetailMode
 If detail mode is >= system detail mode, primitive won't be rendered.
 
FIsRootComponentChanged IsRootComponentChanged
 Delegate invoked when this scene component becomes the actor's root component or when it no longer is.
 
TEnumAsByte< EComponentMobility::Type > Mobility
 How often this component is allowed to move, used to make various optimizations. 更多...
 
FPhysicsVolumeChanged PhysicsVolumeChangedDelegate
 Delegate that will be called when PhysicsVolume has been changed
 
FTransformUpdated TransformUpdated
 Delegate called when this component is moved
 
- Public 属性 继承自 UActorComponent
uint8 bAllowAnyoneToDestroyMe:1
 Can this component be destroyed (via K2_DestroyComponent) by any parent
 
uint8 bAllowConcurrentTick:1
 Can we tick this concurrently on other threads?
 
uint8 bAutoActivate:1
 Whether the component is activated at creation or must be explicitly activated.
 
uint8 bAutoRegister:1
 Does this component automatically register with its owner
 
uint8 bEditableWhenInherited:1
 True if this component can be modified when it was inherited from a parent actor class
 
uint8 bIsEditorOnly:1
 If true, the component will be excluded from non-editor builds
 
uint8 bNavigationRelevant: 1
 Cached navigation relevancy flag for collision updates
 
uint8 bNeverNeedsRenderUpdate:1
 If true, this component never needs a render update.
 
uint8 bTickInEditor:1
 Should this component be ticked in the editor
 
uint8 bWantsInitializeComponent:1
 If true, we call the virtual InitializeComponent
 
TArray< FName > ComponentTags
 Array of tags that can be used for grouping and categorizing. 更多...
 
EComponentCreationMethod CreationMethod
 Describes how a component instance will be created
 
FActorComponentActivatedSignature OnComponentActivated
 Called when the component has been activated, with parameter indicating if it was from a reset
 
FActorComponentDeactivateSignature OnComponentDeactivated
 Called when the component has been deactivated
 
struct FActorComponentTickFunction PrimaryComponentTick
 Main tick function for the Component
 

静态 Public 属性

static uint32 GlobalOverlapEventsCounter
 Count of all component overlap events (begin or end) ever generated for any components. 更多...
 
- 静态 Public 属性 继承自 USceneComponent
static int32 SkipUpdateOverlapsOptimEnabled
 Global flag to enable/disable overlap optimizations, settable with p.SkipUpdateOverlapsOptimEnabled cvar
 
- 静态 Public 属性 继承自 UActorComponent
static const FString ComponentTemplateNameSuffix
 Prefix used to identify template component instances
 
static FActorComponentGlobalCreatePhysicsSignature GlobalCreatePhysicsDelegate
 Create component physics state global delegate.
 
static FActorComponentGlobalDestroyPhysicsSignature GlobalDestroyPhysicsDelegate
 Destroy component physics state global delegate.
 
static FOnMarkRenderStateDirty MarkRenderStateDirtyEvent
 Called When render state is marked dirty
 

Protected 成员函数

virtual bool AreAllCollideableDescendantsRelative (bool bAllowCachedValue=true) const
 Returns true if all descendant components that we can possibly overlap with use relative location and rotation.
 
void ClearComponentOverlaps (bool bDoNotifies, bool bSkipNotifySelf)
 Ends all current component overlaps. 更多...
 
virtual bool ComponentOverlapComponentImpl (class UPrimitiveComponent *PrimComp, const FVector Pos, const FQuat &Rot, const FCollisionQueryParams &Params)
 Override this method for custom behavior for ComponentOverlapComponent()
 
virtual bool ComponentOverlapMultiImpl (TArray< struct FOverlapResult > &OutOverlaps, const class UWorld *InWorld, const FVector &Pos, const FQuat &Rot, ECollisionChannel TestChannel, const struct FComponentQueryParams &Params, const struct FCollisionObjectQueryParams &ObjectQueryParams=FCollisionObjectQueryParams::DefaultObjectQueryParam) const
 Override this method for custom behavior for ComponentOverlapMulti()
 
void EnsurePhysicsStateCreated ()
 Ensure physics state created
 
void MarkChildPrimitiveComponentRenderStateDirty ()
 Go through attached primitive components and call MarkRenderStateDirty
 
virtual void OnComponentCollisionSettingsChanged (bool bUpdateOverlaps=true)
 Called when the BodyInstance ResponseToChannels, CollisionEnabled or bNotifyRigidBodyCollision changes, in case subclasses want to use that information.
 
void ResetCustomPrimitiveData ()
 Reset the custom primitive data of this primitive to the optional user defined default
 
void SendPhysicsTransform (ETeleportType Teleport)
 Called to send a transform update for this component to the physics engine
 
void SetCustomPrimitiveDataInternal (int32 DataIndex, const TArray< float > &Values)
 Insert an array of floats into the CustomPrimitiveData, starting at the given index
 
void SetDefaultCustomPrimitiveData (int32 DataIndex, const TArray< float > &Values)
 Insert an array of floats into the CustomPrimitiveData defaults, starting at the given index
 
virtual bool SupportsStaticLighting () const
 Whether the component type supports static lighting.
 
virtual void UpdatePhysicsToRBChannels ()
 Internal function that updates physics objects to match the component collision settings.
 
- Protected 成员函数 继承自 USceneComponent
FORCEINLINE bool AreDynamicDataChangesAllowed (bool bIgnoreStationary=true) const
 Determine if dynamic data is allowed to be changed. 更多...
 
FORCEINLINE FTransform CalcNewComponentToWorld (const FTransform &NewRelativeTransform, const USceneComponent *Parent=nullptr, FName SocketName=NAME_None) const
 Calculate the new ComponentToWorld transform for this component. 更多...
 
FTransform CalcNewComponentToWorld_GeneralCase (const FTransform &NewRelativeTransform, const USceneComponent *Parent, FName SocketName) const
 Utility function to handle calculating transform with a parent
 
bool CheckStaticMobilityAndWarn (const FText &ActionText) const
 Check if mobility is set to non-static. 更多...
 
bool InternalSetWorldLocationAndRotation (FVector NewLocation, const FQuat &NewQuat, bool bNoPhysics=false, ETeleportType Teleport=ETeleportType::None)
 Internal helper, for use from MoveComponent(). 更多...
 
virtual bool MoveComponentImpl (const FVector &Delta, const FQuat &NewRotation, bool bSweep, FHitResult *Hit=NULL, EMoveComponentFlags MoveFlags=MOVECOMP_NoFlags, ETeleportType Teleport=ETeleportType::None)
 Override this method for custom behavior for MoveComponent
 
virtual void OnChildAttached (USceneComponent *ChildComponent)
 Called after a child scene component is attached to this component. 更多...
 
virtual void OnChildDetached (USceneComponent *ChildComponent)
 Called after a child scene component is detached from this component. 更多...
 
virtual void OnHiddenInGameChanged ()
 Overridable internal function to respond to changes in the hidden in game value of the component.
 
virtual void OnUpdateTransform (EUpdateTransformFlags UpdateTransformFlags, ETeleportType Teleport=ETeleportType::None)
 Native callback when this component is moved
 
virtual void OnVisibilityChanged ()
 Overridable internal function to respond to changes in the visibility of the component.
 
void PostUpdateNavigationData ()
 Called after changing transform, tries to update navigation octree for owner
 
void UpdateNavigationData ()
 Called after changing transform, tries to update navigation octree for this component
 
virtual bool UpdateOverlapsImpl (const TOverlapArrayView *PendingOverlaps=nullptr, bool bDoNotifies=true, const TOverlapArrayView *OverlapsAtEndLocation=nullptr)
 Internal helper for UpdateOverlaps
 
- Protected 成员函数 继承自 UActorComponent
virtual void CreateRenderState_Concurrent (FRegisterComponentContext *Context)
 Used to create any rendering thread information for this component 更多...
 
virtual void DestroyRenderState_Concurrent ()
 Used to shut down any rendering thread structure for this component 更多...
 
void HandleCanEverAffectNavigationChange (bool bForceUpdate=false)
 Makes sure navigation system has up to date information regarding component's navigation relevancy and if it can affect navigation at all 更多...
 
virtual bool HasValidPhysicsState () const
 Used to check that DestroyPhysicsState() is working correctly
 
bool NeedsInitialization () const
 Convenience method for testing whether or not we are still be constructed / initialized.
 
virtual void OnCreatePhysicsState ()
 Used to create any physics engine information for this component
 
virtual void OnDestroyPhysicsState ()
 Used to shut down and physics engine structure for this component
 
virtual void OnRegister ()
 Called when a component is registered, after Scene is set, but before CreateRenderState_Concurrent or OnCreatePhysicsState are called.
 
virtual void OnUnregister ()
 Called when a component is unregistered. 更多...
 
bool OwnerNeedsInitialization () const
 Convenience method for testing whether or not our owner is still being constructed / initialized.
 
virtual void RegisterComponentTickFunctions (bool bRegister)
 Virtual call chain to register all tick functions 更多...
 
virtual void SendRenderDynamicData_Concurrent ()
 Called to send dynamic data for this component to the rendering thread
 
virtual void SendRenderTransform_Concurrent ()
 Called to send a transform update for this component to the rendering thread 更多...
 
void SetIsReplicatedByDefault (const bool bNewReplicates)
 Sets the value of bReplicates without causing other side effects to this instance. 更多...
 
virtual bool ShouldActivate () const
 Return true if this component is in a state where it can be activated normally.
 
virtual bool ShouldCreatePhysicsState () const
 Return true if CreatePhysicsState() should be called. 更多...
 
virtual bool ShouldCreateRenderState () const
 Return true if CreateRenderState() should be called
 
- 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 bCachedAllCollideableDescendantsRelative: 1
 Result of last call to AreAllCollideableDescendantsRelative().
 
float LastCheckedAllCollideableDescendantsTime
 Last time we checked AreAllCollideableDescendantsRelative(), so we can throttle those tests since it rarely changes once false.
 
TArray< FOverlapInfo > OverlappingComponents
 Set of components that this component is currently overlapping.
 
- Protected 属性 继承自 USceneComponent
uint8 bDisableDetachmentUpdateOverlaps:1
 Transient flag that temporarily disables UpdateOverlaps within DetachFromParent().
 
uint8 bWantsOnUpdateTransform:1
 If true, OnUpdateTransform virtual will be called each time this component is moved.
 
- Protected 属性 继承自 UActorComponent
TArray< UAssetUserData * > AssetUserData
 Array of user data stored with the component
 
uint8 bAllowReregistration:1
 Check whether the component class allows reregistration during ReregisterAllComponents
 
uint8 bCanEverAffectNavigation: 1
 Whether this component can potentially influence navigation
 
uint8 bNetAddressable:1
 Is this component safe to ID over the network by name?

 
uint8 bPhysicsStateCreated:1
 If the physics state is currently created for this component
 
uint8 bRegistered:1
 Indicates if this ActorComponent is currently registered with a scene.
 
uint8 bRenderStateCreated:1
 If the render state is currently created for this component
 

静态 Protected 属性

static FThreadSafeCounter NextComponentId
 Next id to be used by a component.
 

友元

class FPrimitiveSceneInfo
 
class FStaticMeshComponentRecreateRenderStateContext
 Give the static mesh component recreate render state context access to Create/DestroyRenderState_Concurrent().
 

额外继承的成员函数

- 静态 Public 成员函数 继承自 USceneComponent
static void ConvertAttachLocation (EAttachLocation::Type InAttachLocation, EAttachmentRule &InOutLocationRule, EAttachmentRule &InOutRotationRule, EAttachmentRule &InOutScaleRule)
 Backwards compatibility: Used to convert old-style EAttachLocation to new-style EAttachmentRules
 
static const FName GetAbsoluteLocationPropertyName ()
 Gets the property name for bAbsoluteLocation. 更多...
 
static const FName GetAbsoluteRotationPropertyName ()
 Gets the property name for bAbsoluteRotation. 更多...
 
static const FName GetAbsoluteScalePropertyName ()
 Gets the property name for bAbsoluteScale. 更多...
 
static FName GetDefaultSceneRootVariableName ()
 The name to use for the default scene root variable
 
static const FName GetRelativeLocationPropertyName ()
 Gets the property name for RelativeLocation. 更多...
 
static const FName GetRelativeRotationPropertyName ()
 Gets the property name for RelativeRotation. 更多...
 
static const FName GetRelativeScale3DPropertyName ()
 Gets the property name for RelativeScale3D. 更多...
 
static const FName GetVisiblePropertyName ()
 Gets the property name for bVisible. 更多...
 
- 静态 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
 
- 静态 Protected 成员函数 继承自 UActorComponent
static const FName GetReplicatesPropertyName ()
 Gets the property name for bReplicates. 更多...
 
- 静态 Protected 成员函数 继承自 UObjectBaseUtility
static void CreateClusterFromObject (UObjectBaseUtility *ClusterRootObject, UObjectBaseUtility *ReferencingObject)
 Helper function to create a cluster from UObject
 

详细描述

PrimitiveComponents are SceneComponents that contain or generate some sort of geometry, generally to be rendered or used as collision data.

There are several subclasses for the various types of geometry, but the most common by far are the ShapeComponents (Capsule, Sphere, Box), StaticMeshComponent, and SkeletalMeshComponent. ShapeComponents generate geometry that is used for collision detection but are not rendered, while StaticMeshComponents and SkeletalMeshComponents contain pre-built geometry that is rendered, but can also be used for collision detection.

成员函数说明

◆ AddAngularImpulse()

virtual void UPrimitiveComponent::AddAngularImpulse ( FVector  Impulse,
FName  BoneName = NAME_None,
bool  bVelChange = false 
)
inlinevirtual

Add an angular impulse to a single rigid body.

Good for one time instant burst.

参数
AngularImpulseMagnitude and direction of impulse to apply. Direction is axis of rotation.
BoneNameIf a SkeletalMeshComponent, name of body to apply angular impulse to. 'None' indicates root body.
bVelChangeIf true, the Strength is taken as a change in angular velocity instead of an impulse (ie. mass will have no effect).

◆ AddAngularImpulseInDegrees()

void UPrimitiveComponent::AddAngularImpulseInDegrees ( FVector  Impulse,
FName  BoneName = NAME_None,
bool  bVelChange = false 
)
inline

Add an angular impulse to a single rigid body.

Good for one time instant burst.

参数
AngularImpulseMagnitude and direction of impulse to apply. Direction is axis of rotation.
BoneNameIf a SkeletalMeshComponent, name of body to apply angular impulse to. 'None' indicates root body.
bVelChangeIf true, the Strength is taken as a change in angular velocity instead of an impulse (ie. mass will have no effect).

◆ AddAngularImpulseInRadians()

virtual void UPrimitiveComponent::AddAngularImpulseInRadians ( FVector  Impulse,
FName  BoneName = NAME_None,
bool  bVelChange = false 
)
virtual

Add an angular impulse to a single rigid body.

Good for one time instant burst.

参数
AngularImpulseMagnitude and direction of impulse to apply. Direction is axis of rotation.
BoneNameIf a SkeletalMeshComponent, name of body to apply angular impulse to. 'None' indicates root body.
bVelChangeIf true, the Strength is taken as a change in angular velocity instead of an impulse (ie. mass will have no effect).

◆ AddForce()

virtual void UPrimitiveComponent::AddForce ( FVector  Force,
FName  BoneName = NAME_None,
bool  bAccelChange = false 
)
virtual

Add a force to a single rigid body.

This is like a 'thruster'. Good for adding a burst over some (non zero) time. Should be called every frame for the duration of the force.

参数
ForceForce vector to apply. Magnitude indicates strength of force.
BoneNameIf a SkeletalMeshComponent, name of body to apply force to. 'None' indicates root body.
bAccelChangeIf true, Force is taken as a change in acceleration instead of a physical force (i.e. mass will have no effect).

◆ AddForceAtLocation()

virtual void UPrimitiveComponent::AddForceAtLocation ( FVector  Force,
FVector  Location,
FName  BoneName = NAME_None 
)
virtual

Add a force to a single rigid body at a particular location in world space.

This is like a 'thruster'. Good for adding a burst over some (non zero) time. Should be called every frame for the duration of the force.

参数
ForceForce vector to apply. Magnitude indicates strength of force.
LocationLocation to apply force, in world space.
BoneNameIf a SkeletalMeshComponent, name of body to apply force to. 'None' indicates root body.

◆ AddForceAtLocationLocal()

virtual void UPrimitiveComponent::AddForceAtLocationLocal ( FVector  Force,
FVector  Location,
FName  BoneName = NAME_None 
)
virtual

Add a force to a single rigid body at a particular location.

Both Force and Location should be in body space. This is like a 'thruster'. Good for adding a burst over some (non zero) time. Should be called every frame for the duration of the force.

参数
ForceForce vector to apply. Magnitude indicates strength of force.
LocationLocation to apply force, in component space.
BoneNameIf a SkeletalMeshComponent, name of body to apply force to. 'None' indicates root body.

◆ AddImpulse()

virtual void UPrimitiveComponent::AddImpulse ( FVector  Impulse,
FName  BoneName = NAME_None,
bool  bVelChange = false 
)
virtual

Add an impulse to a single rigid body.

Good for one time instant burst.

参数
ImpulseMagnitude and direction of impulse to apply.
BoneNameIf a SkeletalMeshComponent, name of body to apply impulse to. 'None' indicates root body.
bVelChangeIf true, the Strength is taken as a change in velocity instead of an impulse (ie. mass will have no effect).

◆ AddImpulseAtLocation()

virtual void UPrimitiveComponent::AddImpulseAtLocation ( FVector  Impulse,
FVector  Location,
FName  BoneName = NAME_None 
)
virtual

Add an impulse to a single rigid body at a specific location.

参数
ImpulseMagnitude and direction of impulse to apply.
LocationPoint in world space to apply impulse at.
BoneNameIf a SkeletalMeshComponent, name of bone to apply impulse to. 'None' indicates root body.

◆ AddRadialForce()

virtual void UPrimitiveComponent::AddRadialForce ( FVector  Origin,
float  Radius,
float  Strength,
enum ERadialImpulseFalloff  Falloff,
bool  bAccelChange = false 
)
virtual

Add a force to all bodies in this component, originating from the supplied world-space location.

参数
OriginOrigin of force in world space.
RadiusRadius within which to apply the force.
StrengthStrength of force to apply.
FalloffAllows you to control the strength of the force as a function of distance from Origin.
bAccelChangeIf true, Strength is taken as a change in acceleration instead of a physical force (i.e. mass will have no effect).

被 USkeletalMeshComponent 重载.

◆ AddRadialImpulse()

virtual void UPrimitiveComponent::AddRadialImpulse ( FVector  Origin,
float  Radius,
float  Strength,
enum ERadialImpulseFalloff  Falloff,
bool  bVelChange = false 
)
virtual

Add an impulse to all rigid bodies in this component, radiating out from the specified position.

参数
OriginPoint of origin for the radial impulse blast, in world space
RadiusSize of radial impulse. Beyond this distance from Origin, there will be no affect.
StrengthMaximum strength of impulse applied to body.
FalloffAllows you to control the strength of the impulse as a function of distance from Origin.
bVelChangeIf true, the Strength is taken as a change in velocity instead of an impulse (ie. mass will have no effect).

被 USkeletalMeshComponent 重载.

◆ AddTorque()

void UPrimitiveComponent::AddTorque ( FVector  Torque,
FName  BoneName = NAME_None,
bool  bAccelChange = false 
)
inline

Add a torque to a single rigid body.

参数
TorqueTorque to apply. Direction is axis of rotation and magnitude is strength of torque.
BoneNameIf a SkeletalMeshComponent, name of body to apply torque to. 'None' indicates root body.
bAccelChangeIf true, Torque is taken as a change in angular acceleration instead of a physical torque (i.e. mass will have no effect).

◆ AddTorqueInDegrees()

void UPrimitiveComponent::AddTorqueInDegrees ( FVector  Torque,
FName  BoneName = NAME_None,
bool  bAccelChange = false 
)
inline

Add a torque to a single rigid body.

参数
TorqueTorque to apply. Direction is axis of rotation and magnitude is strength of torque.
BoneNameIf a SkeletalMeshComponent, name of body to apply torque to. 'None' indicates root body.
bAccelChangeIf true, Torque is taken as a change in angular acceleration instead of a physical torque (i.e. mass will have no effect).

◆ AddTorqueInRadians()

virtual void UPrimitiveComponent::AddTorqueInRadians ( FVector  Torque,
FName  BoneName = NAME_None,
bool  bAccelChange = false 
)
virtual

Add a torque to a single rigid body.

参数
TorqueTorque to apply. Direction is axis of rotation and magnitude is strength of torque.
BoneNameIf a SkeletalMeshComponent, name of body to apply torque to. 'None' indicates root body.
bAccelChangeIf true, Torque is taken as a change in angular acceleration instead of a physical torque (i.e. mass will have no effect).

◆ AreSymmetricRotations()

virtual bool UPrimitiveComponent::AreSymmetricRotations ( const FQuat &  A,
const FQuat &  B,
const FVector &  Scale3D 
) const
inlinevirtual

Returns true if the given transforms result in the same bounds, due to rotational symmetry.

For example, this is true for a sphere with uniform scale undergoing any rotation. This is NOT intended to detect every case where this is true, only the common cases to aid optimizations.

被 UCapsuleComponent , 以及 USphereComponent 重载.

◆ BeginComponentOverlap()

void UPrimitiveComponent::BeginComponentOverlap ( const FOverlapInfo &  OtherOverlap,
bool  bDoNotifies 
)

Begin tracking an overlap interaction with the component specified.

参数
OtherComp- The component of the other actor that this component is now overlapping
bDoNotifies- True to dispatch appropriate begin/end overlap notifications when these events occur.
参见
Overlap Events

◆ BeginDestroy()

virtual void UPrimitiveComponent::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.

重载 USceneComponent .

被 UInstancedStaticMeshComponent, USkinnedMeshComponent, UStaticMeshComponent , 以及 UParticleSystemComponent 重载.

◆ BeginPlay()

virtual void UPrimitiveComponent::BeginPlay ( )
overridevirtual

Used to detach physics objects before simulation begins.

This is needed because at runtime we can't have simulated objects inside the attachment hierarchy

重载 UActorComponent .

被 USkeletalMeshComponent, UGeometryCollectionComponent , 以及 UWidgetComponent 重载.

◆ BuildTextureStreamingData()

virtual bool UPrimitiveComponent::BuildTextureStreamingData ( ETextureStreamingBuildType  BuildType,
EMaterialQualityLevel::Type  QualityLevel,
ERHIFeatureLevel::Type  FeatureLevel,
TSet< FGuid > &  DependentResources 
)
inlinevirtual

Update the streaming data of this component.

参数
BuildType[in] The type of build. Affects what the build is allowed to do.
QualityLevel[in] The quality level being used in the texture streaming build.
FeatureLevel[in] The feature level being used in the texture streaming build.
DependentResources[out] The resource the build depends on.
返回
Returns false if some data needs rebuild but couldn't be rebuilt (because of the build type).

被 UStaticMeshComponent 重载.

◆ CalculateMass()

virtual float UPrimitiveComponent::CalculateMass ( FName  BoneName = NAME_None)
virtual

Returns the calculated mass in kg.

This is not 100% exactly the mass physx will calculate, but it is very close ( difference < 0.1kg ).

被 USkeletalMeshComponent 重载.

◆ CanCharacterStepUp()

virtual bool UPrimitiveComponent::CanCharacterStepUp ( class APawn *  Pawn) const
virtual

Return true if the given Pawn can step up onto this component.

This controls whether they can try to step up on it when they bump in to it, not whether they can walk on it after landing on it.

参数
Pawnthe Pawn that wants to step onto this component.
参见
CanCharacterStepUpOn

◆ ClearComponentOverlaps()

void UPrimitiveComponent::ClearComponentOverlaps ( bool  bDoNotifies,
bool  bSkipNotifySelf 
)
protected

Ends all current component overlaps.

Generally used when destroying this component or when it can no longer generate overlaps.

◆ ComponentOverlapComponent()

FORCEINLINE_DEBUGGABLE bool UPrimitiveComponent::ComponentOverlapComponent ( class UPrimitiveComponent *  PrimComp,
const FVector  Pos,
const FQuat &  Rot,
const FCollisionQueryParams &  Params 
)

Test the collision of the supplied component at the supplied location/rotation, and determine if it overlaps this component.

注解
This overload taking rotation as a FQuat is slightly faster than the version using FRotator.
This simply calls the virtual ComponentOverlapComponentImpl() which can be overridden to implement custom behavior.
参数
PrimCompComponent to use geometry from to test against this component. Transform of this component is ignored.
PosLocation to place PrimComp geometry at
RotRotation to place PrimComp geometry at
ParamsParameter for trace. TraceTag is only used.
返回
true if PrimComp overlaps this component at the specified location/rotation

◆ ComponentOverlapMulti()

FORCEINLINE_DEBUGGABLE bool UPrimitiveComponent::ComponentOverlapMulti ( TArray< struct FOverlapResult > &  OutOverlaps,
const class UWorld *  InWorld,
const FVector &  Pos,
const FQuat &  Rot,
ECollisionChannel  TestChannel,
const struct FComponentQueryParams &  Params = FComponentQueryParams::DefaultComponentQueryParams,
const struct FCollisionObjectQueryParams &  ObjectQueryParams = FCollisionObjectQueryParams::DefaultObjectQueryParam 
) const

Test the collision of the supplied component at the supplied location/rotation, and determine the set of components that it overlaps.

注解
This overload taking rotation as a FQuat is slightly faster than the version using FRotator.
This simply calls the virtual ComponentOverlapMultiImpl() which can be overridden to implement custom behavior.
参数
OutOverlapsArray of overlaps found between this component in specified pose and the world
WorldWorld to use for overlap test
PosLocation of component's geometry for the test against the world
RotRotation of component's geometry for the test against the world
TestChannelThe 'channel' that this ray is in, used to determine which components to hit
ObjectQueryParamsList of object types it's looking for. When this enters, we do object query with component shape
返回
true if OutOverlaps contains any blocking results

◆ ComputePenetration()

virtual bool UPrimitiveComponent::ComputePenetration ( FMTDResult &  OutMTD,
const FCollisionShape &  CollisionShape,
const FVector &  Pos,
const FQuat &  Rot 
)
virtual

Computes the minimum translation direction (MTD) when an overlap exists between the component and the given shape.

参数
OutMTDOutputs the MTD to move CollisionShape out of penetration
CollisionShapeShape information for the geometry testing against
PosLocation of collision shape
RotRotation of collision shape
返回
true if the computation succeeded - assumes that there is an overlap at the specified position/rotation

◆ CreateAndSetMaterialInstanceDynamic()

virtual class UMaterialInstanceDynamic * UPrimitiveComponent::CreateAndSetMaterialInstanceDynamic ( int32  ElementIndex)
virtual

Creates a Dynamic Material Instance for the specified element index.

The parent of the instance is set to the material being replaced.

参数
ElementIndex- The index of the skin to replace the material for. If invalid, the material is unchanged and NULL is returned.

◆ CreateAndSetMaterialInstanceDynamicFromMaterial()

virtual class UMaterialInstanceDynamic * UPrimitiveComponent::CreateAndSetMaterialInstanceDynamicFromMaterial ( int32  ElementIndex,
class UMaterialInterface *  Parent 
)
virtual

Creates a Dynamic Material Instance for the specified element index.

The parent of the instance is set to the material being replaced.

参数
ElementIndex- The index of the skin to replace the material for. If invalid, the material is unchanged and NULL is returned.

◆ CreateDynamicMaterialInstance()

virtual class UMaterialInstanceDynamic * UPrimitiveComponent::CreateDynamicMaterialInstance ( int32  ElementIndex,
class UMaterialInterface *  SourceMaterial = NULL,
FName  OptionalName = NAME_None 
)
virtual

Creates a Dynamic Material Instance for the specified element index, optionally from the supplied material.

参数
ElementIndex- The index of the skin to replace the material for. If invalid, the material is unchanged and NULL is returned.

◆ CreateRenderState_Concurrent()

virtual void UPrimitiveComponent::CreateRenderState_Concurrent ( FRegisterComponentContext *  Context)
overridevirtual

Used to create any rendering thread information for this component

警告
This is called concurrently on multiple threads (but never the same component concurrently)

重载 UActorComponent .

被 UModelComponent, USkinnedMeshComponent, UStaticMeshComponent, UParticleSystemComponent , 以及 UGeometryCollectionComponent 重载.

◆ CreateSceneProxy()

virtual FPrimitiveSceneProxy * UPrimitiveComponent::CreateSceneProxy ( )
inlinevirtual

◆ DestroyRenderState_Concurrent()

virtual void UPrimitiveComponent::DestroyRenderState_Concurrent ( )
overridevirtual

Used to shut down any rendering thread structure for this component

警告
This is called concurrently on multiple threads (but never the same component concurrently)

重载 UActorComponent .

被 UModelComponent, USkinnedMeshComponent , 以及 UParticleSystemComponent 重载.

◆ DispatchBlockingHit()

void UPrimitiveComponent::DispatchBlockingHit ( AActor &  OutOwner,
FHitResult const &  BlockingHit 
)

Dispatch notifications for the given HitResult.

参数
OwnerAActor that owns this component
BlockingHitFHitResult that generated the blocking hit.

◆ DoCustomNavigableGeometryExport()

virtual bool UPrimitiveComponent::DoCustomNavigableGeometryExport ( FNavigableGeometryExport &  GeomExport) const
inlinevirtual

Collects custom navigable geometry of component.

返回
true if regular navigable geometry exporting should be run as well

被 UInstancedStaticMeshComponent, UShapeComponent, USkeletalMeshComponent, USplineMeshComponent, UStaticMeshComponent , 以及 UGeometryCollectionComponent 重载.

◆ EndComponentOverlap()

void UPrimitiveComponent::EndComponentOverlap ( const FOverlapInfo &  OtherOverlap,
bool  bDoNotifies = true,
bool  bSkipNotifySelf = false 
)

Finish tracking an overlap interaction that is no longer occurring between this component and the component specified.

参数
OtherCompThe component of the other actor to stop overlapping
bDoNotifiesTrue to dispatch appropriate begin/end overlap notifications when these events occur.
bSkipNotifySelfTrue to skip end overlap notifications to this component's. Does not affect notifications to OtherComp's actor.
参见
Overlap Events

◆ FinishDestroy()

virtual void UPrimitiveComponent::FinishDestroy ( )
overridevirtual

Called to finish destroying the object.

After UObject::FinishDestroy is called, the object's memory should no longer be accessed.

警告
Because properties are destroyed here, Super::FinishDestroy() should always be called at the end of your child class's FinishDestroy() method, rather than at the beginning.

重载 UObject .

被 UParticleSystemComponent 重载.

◆ GetBodyInstance()

virtual FBodyInstance * UPrimitiveComponent::GetBodyInstance ( FName  BoneName = NAME_None,
bool  bGetWelded = true 
) const
virtual

Returns BodyInstance of the component.

参数
BoneNameUsed to get body associated with specific bone. NAME_None automatically gets the root most body
bGetWeldedIf the component has been welded to another component and bGetWelded is true we return the single welded BodyInstance that is used in the simulation
返回
Returns the BodyInstance based on various states (does component have multiple bodies? Is the body welded to another body?)

被 USkeletalMeshComponent, UParticleSystemComponent , 以及 UGeometryCollectionComponent 重载.

◆ GetCenterOfMass()

FVector UPrimitiveComponent::GetCenterOfMass ( FName  BoneName = NAME_None) const

Get the center of mass of a single body.

In the case of a welded body this will return the center of mass of the entire welded body (including its parent and children) Objects that are not simulated return (0,0,0) as they do not have COM

参数
BoneNameIf a SkeletalMeshComponent, name of body to get center of mass of. 'None' indicates root body.

◆ GetClosestPointOnCollision()

float UPrimitiveComponent::GetClosestPointOnCollision ( const FVector &  Point,
FVector &  OutPointOnBody,
FName  BoneName = NAME_None 
) const

Returns the distance and closest point to the collision surface.

Component must have simple collision to be queried for closest point.

参数
PointWorld 3D vector
OutPointOnBodyPoint on the surface of collision closest to Point
BoneNameIf a SkeletalMeshComponent, name of body to set center of mass of. 'None' indicates root body.
返回
Success if returns > 0.f, if returns 0.f, it is either not convex or inside of the point If returns < 0.f, this primitive does not have collsion

◆ GetComponentTransformFromBodyInstance()

virtual FTransform UPrimitiveComponent::GetComponentTransformFromBodyInstance ( FBodyInstance *  UseBI)
virtual

Called to get the Component To World Transform from the Root BodyInstance This needs to be virtual since SkeletalMeshComponent Root has to undo its own transform Without this, the root LocalToAtom is overridden by physics simulation, causing kinematic velocity to accelerate simulation

参数
UseBI - root body instance
返回
: New GetComponentTransform() to use

被 USkeletalMeshComponent 重载.

◆ GetComponentVelocity()

virtual FVector UPrimitiveComponent::GetComponentVelocity ( ) const
overridevirtual

Get velocity of the component: either ComponentVelocity, or the velocity of the physics body if simulating physics.

返回
Velocity of the component

重载 USceneComponent .

◆ GetCustomPrimitiveData()

const FCustomPrimitiveData & UPrimitiveComponent::GetCustomPrimitiveData ( ) const
inline

Get the custom primitive data for this primitive component.

返回
The payload of custom data that will be set on the primitive and accessible in the material through a material expression.

◆ GetDefaultCustomPrimitiveData()

const FCustomPrimitiveData & UPrimitiveComponent::GetDefaultCustomPrimitiveData ( ) const
inline

Get the default custom primitive data for this primitive component.

返回
The payload of custom data that will be set on the primitive and accessible in the material through a material expression.

◆ GetDistanceToCollision()

float UPrimitiveComponent::GetDistanceToCollision ( const FVector &  Point,
FVector &  ClosestPointOnCollision 
) const
inline

Returns Distance to closest Body Instance surface.

参数
PointWorld 3D vector
OutPointOnBodyPoint on the surface of collision closest to Point
返回
Success if returns > 0.f, if returns 0.f, point is inside the geometry If returns < 0.f, this primitive does not have collsion or if geometry is not supported

◆ GetGenerateOverlapEvents()

FORCEINLINE_DEBUGGABLE bool UPrimitiveComponent::GetGenerateOverlapEvents ( ) const

If true, this component will generate overlap events when it is overlapping other components (eg Begin Overlap).

Both components (this and the other) must have this enabled for overlap events to occur.

参见
Overlap Events
UpdateOverlaps(), BeginComponentOverlap(), EndComponentOverlap()

◆ GetInertiaTensor()

virtual FVector UPrimitiveComponent::GetInertiaTensor ( FName  BoneName = NAME_None) const
virtual

Returns the inertia tensor of this component in kg cm^2.

The inertia tensor is in local component space.

◆ GetLightAndShadowMapMemoryUsage()

virtual void UPrimitiveComponent::GetLightAndShadowMapMemoryUsage ( int32 &  LightMapMemoryUsage,
int32 &  ShadowMapMemoryUsage 
) const
virtual

Returns the light and shadow map memory for this primitive in its out variables.

Shadow map memory usage is per light whereof lightmap data is independent of number of lights, assuming at least one.

参数
[out]LightMapMemoryUsageMemory usage in bytes for light map (either texel or vertex) data
[out]ShadowMapMemoryUsageMemory usage in bytes for shadow map (either texel or vertex) data

被 UInstancedStaticMeshComponent, UModelComponent , 以及 UStaticMeshComponent 重载.

◆ GetLightingAttachmentRoot()

const UPrimitiveComponent * UPrimitiveComponent::GetLightingAttachmentRoot ( ) const

Walks up the attachment tree until a primitive component with LightAttachmentsAsGroup enabled is found.

This component will effectively act as the root of the attachment group. Return nullptr if none is found.

◆ GetLightMapResolution()

virtual bool UPrimitiveComponent::GetLightMapResolution ( int32 &  Width,
int32 &  Height 
) const
virtual

Returns the lightmap resolution used for this primitive instance in the case of it supporting texture light/ shadow maps.

0 if not supported or no static shadowing.

参数
Width[out] Width of light/shadow map
Height[out] Height of light/shadow map
返回
bool true if LightMap values are padded, false if not

被 UModelComponent , 以及 UStaticMeshComponent 重载.

◆ GetMaterial()

virtual class UMaterialInterface * UPrimitiveComponent::GetMaterial ( int32  ElementIndex) const
virtual

Returns the material used by the element at the specified index

参数
ElementIndex- The element to access the material of.
返回
the material used by the indexed element of this mesh.

被 UMeshComponent, UParticleSystemComponent, UModelComponent, USkinnedMeshComponent, UStaticMeshComponent, UGeometryCollectionComponent , 以及 UWidgetComponent 重载.

◆ GetMaterialFromCollisionFaceIndex()

virtual UMaterialInterface * UPrimitiveComponent::GetMaterialFromCollisionFaceIndex ( int32  FaceIndex,
int32 &  SectionIndex 
) const
virtual

Try and retrieve the material applied to a particular collision face of mesh.

Used with face index returned from collision trace.

参数
FaceIndexFace index from hit result that was hit by a trace
SectionIndexSection of the mesh that the face belongs to
返回
Material applied to section that the hit face belongs to

被 UModelComponent , 以及 UStaticMeshComponent 重载.

◆ GetOverlappingActors() [1/2]

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

Returns a list of actors that this component is overlapping.

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

◆ GetOverlappingActors() [2/2]

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

Returns the set of actors that this component is overlapping.

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

◆ GetOverlapsWithActor()

bool UPrimitiveComponent::GetOverlapsWithActor ( const AActor *  Actor,
TArray< FOverlapInfo > &  OutOverlaps 
) const

Appends list of overlaps with components owned by the given actor to the 'OutOverlaps' array.

Returns true if any overlaps were added.

◆ GetPhysicsAngularVelocity()

FVector UPrimitiveComponent::GetPhysicsAngularVelocity ( FName  BoneName = NAME_None) const
inline

Get the angular velocity of a single body, in degrees per second.

参数
BoneNameIf a SkeletalMeshComponent, name of body to get velocity of. 'None' indicates root body.

◆ GetPhysicsAngularVelocityInDegrees()

FVector UPrimitiveComponent::GetPhysicsAngularVelocityInDegrees ( FName  BoneName = NAME_None) const
inline

Get the angular velocity of a single body, in degrees per second.

参数
BoneNameIf a SkeletalMeshComponent, name of body to get velocity of. 'None' indicates root body.

◆ GetPhysicsAngularVelocityInRadians()

FVector UPrimitiveComponent::GetPhysicsAngularVelocityInRadians ( FName  BoneName = NAME_None) const

Get the angular velocity of a single body, in radians per second.

参数
BoneNameIf a SkeletalMeshComponent, name of body to get velocity of. 'None' indicates root body.

◆ GetPhysicsLinearVelocity()

FVector UPrimitiveComponent::GetPhysicsLinearVelocity ( FName  BoneName = NAME_None)

Get the linear velocity of a single body.

参数
BoneNameIf a SkeletalMeshComponent, name of body to get velocity of. 'None' indicates root body.

◆ GetPhysicsLinearVelocityAtPoint()

FVector UPrimitiveComponent::GetPhysicsLinearVelocityAtPoint ( FVector  Point,
FName  BoneName = NAME_None 
)

Get the linear velocity of a point on a single body.

参数
PointPoint is specified in world space.
BoneNameIf a SkeletalMeshComponent, name of body to get velocity of. 'None' indicates root body.

◆ GetRenderMatrix()

virtual FMatrix UPrimitiveComponent::GetRenderMatrix ( ) const
virtual

Returns the matrix that should be used to render this component.

Allows component class to perform graphical distortion to the component not supported by an FTransform

◆ GetResourceSizeEx()

virtual void UPrimitiveComponent::GetResourceSizeEx ( FResourceSizeEx &  CumulativeResourceSize)
overridevirtual

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).

参数
CumulativeResourceSizeStruct used to count up the cumulative size of the resource as to be displayed to artists/LDs in the Editor.

重载 UObject .

被 UInstancedStaticMeshComponent, USkeletalMeshComponent, USkinnedMeshComponent , 以及 UParticleSystemComponent 重载.

◆ GetRigidBodyState()

bool UPrimitiveComponent::GetRigidBodyState ( FRigidBodyState &  OutState,
FName  BoneName = NAME_None 
)

Get the state of the rigid body responsible for this Actor's physics, and fill in the supplied FRigidBodyState struct based on it.

返回
true if we successfully found a physics-engine body and update the state structure from it.

◆ GetSquaredDistanceToCollision()

virtual bool UPrimitiveComponent::GetSquaredDistanceToCollision ( const FVector &  Point,
float &  OutSquaredDistance,
FVector &  OutClosestPointOnCollision 
) const
virtual

Returns The square of the distance to closest Body Instance surface.

参数
PointWorld 3D vector
OutSquaredDistanceThe squared distance to closest Body Instance surface. 0 if inside of the body
OutPointOnBodyPoint on the surface of collision closest to Point
返回
true if a distance to the body was found and OutDistanceSquared has been populated

被 USkeletalMeshComponent 重载.

◆ GetStaticDepthPriorityGroup()

virtual uint8 UPrimitiveComponent::GetStaticDepthPriorityGroup ( ) const
inlinevirtual

Determines the DPG the primitive's primary elements are drawn in.

Even if the primitive's elements are drawn in multiple DPGs, a primary DPG is needed for occlusion culling and shadow projection.

返回
The DPG the primitive's primary elements will be drawn in.

被 UBrushComponent 重载.

◆ GetStaticLightingType()

virtual ELightMapInteractionType UPrimitiveComponent::GetStaticLightingType ( ) const
inlinevirtual

Requests whether the component will use texture, vertex or no lightmaps.

返回
ELightMapInteractionType The type of lightmap interaction the component will use.

被 UModelComponent , 以及 UStaticMeshComponent 重载.

◆ GetStaticLightMapResolution()

virtual int32 UPrimitiveComponent::GetStaticLightMapResolution ( ) const
inlinevirtual

Returns the static lightmap resolution used for this primitive.

0 if not supported or no static shadowing.

返回
int32 The StaticLightmapResolution for the component

被 UModelComponent , 以及 UStaticMeshComponent 重载.

◆ GetStreamingRenderAssetInfo()

virtual void UPrimitiveComponent::GetStreamingRenderAssetInfo ( FStreamingTextureLevelContext &  LevelContext,
TArray< FStreamingRenderAssetPrimitiveInfo > &  OutStreamingRenderAssets 
) const
virtual

Enumerates the streaming textures/meshes used by the primitive.

参数
LevelContext- Level scope context used to process texture streaming build data.
OutStreamingRenderAssets- Upon return, contains a list of the streaming textures/meshes used by the primitive.

被 UModelComponent, USkinnedMeshComponent, UStaticMeshComponent , 以及 UParticleSystemComponent 重载.

◆ GetStreamingRenderAssetInfoWithNULLRemoval()

void UPrimitiveComponent::GetStreamingRenderAssetInfoWithNULLRemoval ( FStreamingTextureLevelContext &  LevelContext,
TArray< FStreamingRenderAssetPrimitiveInfo > &  OutStreamingRenderAssets 
) const

Call GetStreamingRenderAssetInfo and remove the elements with a NULL texture

参数
OutStreamingRenderAssets- Upon return, contains a list of the non-null streaming textures or meshes used by the primitive.

◆ GetUsedMaterials()

virtual void UPrimitiveComponent::GetUsedMaterials ( TArray< UMaterialInterface * > &  OutMaterials,
bool  bGetDebugMaterials = false 
) const
inlinevirtual

Retrieves the materials used in this component

参数
OutMaterialsThe list of used materials.

被 UVectorFieldComponent, UBrushComponent, UMeshComponent, UModelComponent, USkinnedMeshComponent, UStaticMeshComponent, UParticleSystemComponent , 以及 UWidgetComponent 重载.

◆ GetUsedTextures()

virtual void UPrimitiveComponent::GetUsedTextures ( TArray< UTexture * > &  OutTextures,
EMaterialQualityLevel::Type  QualityLevel 
)
virtual

Returns the material textures used to render this primitive for the given platform.

Internally calls GetUsedMaterials() and GetUsedTextures() for each material.

参数
OutTextures[out] The list of used textures.

◆ GetVirtualTextureMainPassMaxDrawDistance()

virtual float UPrimitiveComponent::GetVirtualTextureMainPassMaxDrawDistance ( ) const
inlinevirtual

Get the max draw distance to use in the main pass when also rendering to a runtime virtual texture.

This is combined with the other max draw distance settings.

被 USplineMeshComponent 重载.

◆ IgnoreActorWhenMoving()

void UPrimitiveComponent::IgnoreActorWhenMoving ( AActor *  Actor,
bool  bShouldIgnore 
)

Tells this component whether to ignore collision with all components of a specific Actor when this component is moved.

Components on the other Actor may also need to be told to do the same when they move. Does not affect movement of this component when simulating physics.

◆ IgnoreComponentWhenMoving()

void UPrimitiveComponent::IgnoreComponentWhenMoving ( UPrimitiveComponent *  Component,
bool  bShouldIgnore 
)

Tells this component whether to ignore collision with another component when this component is moved.

The other components may also need to be told to do the same when they move. Does not affect movement of this component when simulating physics.

◆ IsEditorOnly()

virtual bool UPrimitiveComponent::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 .

被 UBrushComponent 重载.

◆ IsGravityEnabled()

virtual bool UPrimitiveComponent::IsGravityEnabled ( ) const
virtual

Returns whether this component is affected by gravity.

Returns always false if the component is not simulated.

被 USkeletalMeshComponent 重载.

◆ IsOverlappingActor()

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

Check whether this component is overlapping any component of the given Actor.

参数
OtherActor to test this component against.
返回
Whether this component is overlapping any component of the given Actor.

◆ IsOverlappingComponent()

bool UPrimitiveComponent::IsOverlappingComponent ( const UPrimitiveComponent *  OtherComp) const

Check whether this component is overlapping another component.

参数
OtherCompComponent to test this component against.
返回
Whether this component is overlapping another component.

◆ IsReadyForFinishDestroy()

virtual bool UPrimitiveComponent::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 .

◆ IsZeroExtent()

virtual bool UPrimitiveComponent::IsZeroExtent ( ) const
inlinevirtual

This isn't bound extent, but for shape component to utilize extent is 0.

For normal primitive, this is 0, for ShapeComponent, this will have valid information

被 UBoxComponent, UCapsuleComponent , 以及 USphereComponent 重载.

◆ K2_BoxOverlapComponent()

bool UPrimitiveComponent::K2_BoxOverlapComponent ( FVector  InBoxCentre,
const FBox  InBox,
bool  bTraceComplex,
bool  bShowTrace,
bool  bPersistentShowTrace,
FVector &  HitLocation,
FVector &  HitNormal,
FName &  BoneName,
FHitResult &  OutHit 
)

Perform a box overlap against a single component as an AABB (No rotation)

参数
InBoxCentreThe centre of the box to overlap with the component
InBoxDescription of the box to use in the overlap
bTraceComplexWhether or not to trace the complex physics representation or just the simple representation
bShowTraceWhether or not to draw the trace in the world (for debugging)
bPersistentShowTraceWhether or not to make the debugging draw stay in the world permanently

◆ K2_LineTraceComponent()

bool UPrimitiveComponent::K2_LineTraceComponent ( FVector  TraceStart,
FVector  TraceEnd,
bool  bTraceComplex,
bool  bShowTrace,
bool  bPersistentShowTrace,
FVector &  HitLocation,
FVector &  HitNormal,
FName &  BoneName,
FHitResult &  OutHit 
)

Perform a line trace against a single component

参数
TraceStartThe start of the trace in world-space
TraceEndThe end of the trace in world-space
bTraceComplexWhether or not to trace the complex physics representation or just the simple representation
bShowTraceWhether or not to draw the trace in the world (for debugging)
bPersistentShowTraceWhether or not to make the debugging draw stay in the world permanently

◆ K2_SphereOverlapComponent()

bool UPrimitiveComponent::K2_SphereOverlapComponent ( FVector  InSphereCentre,
float  InSphereRadius,
bool  bTraceComplex,
bool  bShowTrace,
bool  bPersistentShowTrace,
FVector &  HitLocation,
FVector &  HitNormal,
FName &  BoneName,
FHitResult &  OutHit 
)

Perform a sphere overlap against a single component

参数
InSphereCentreThe centre of the sphere to overlap with the component
InSphereRadiusThe Radius of the sphere to overlap with the component
bTraceComplexWhether or not to trace the complex physics representation or just the simple representation
bShowTraceWhether or not to draw the trace in the world (for debugging)
bPersistentShowTraceWhether or not to make the debugging draw stay in the world permanently

◆ K2_SphereTraceComponent()

bool UPrimitiveComponent::K2_SphereTraceComponent ( FVector  TraceStart,
FVector  TraceEnd,
float  SphereRadius,
bool  bTraceComplex,
bool  bShowTrace,
bool  bPersistentShowTrace,
FVector &  HitLocation,
FVector &  HitNormal,
FName &  BoneName,
FHitResult &  OutHit 
)

Perform a sphere trace against a single component

参数
TraceStartThe start of the trace in world-space
TraceEndThe end of the trace in world-space
SphereRadiusRadius of the sphere to trace against the component
bTraceComplexWhether or not to trace the complex physics representation or just the simple representation
bShowTraceWhether or not to draw the trace in the world (for debugging)
bPersistentShowTraceWhether or not to make the debugging draw stay in the world permanently

◆ LineTraceComponent()

virtual bool UPrimitiveComponent::LineTraceComponent ( FHitResult &  OutHit,
const FVector  Start,
const FVector  End,
const FCollisionQueryParams &  Params 
)
virtual

Trace a ray against just this component.

参数
OutHitInformation about hit against this component, if true is returned
StartStart location of the ray
EndEnd location of the ray
ParamsAdditional parameters used for the trace
返回
true if a hit is found

被 USkeletalMeshComponent 重载.

◆ NeedsLoadForClient()

virtual bool UPrimitiveComponent::NeedsLoadForClient ( ) const
overridevirtual

Called during saving to determine the load flags to save with the object.

If false, this object will be discarded on clients

返回
true if this object should be loaded on clients

重载 UActorComponent .

◆ NeedsLoadForServer()

virtual bool UPrimitiveComponent::NeedsLoadForServer ( ) const
overridevirtual

Called during saving to determine the load flags to save with the object.

If false, this object will be discarded on servers

返回
true if this object should be loaded on servers

重载 UActorComponent .

◆ OnComponentDestroyed()

virtual void UPrimitiveComponent::OnComponentDestroyed ( bool  bDestroyingHierarchy)
overridevirtual

Called when a component is destroyed

参数
bDestroyingHierarchy- True if the entire component hierarchy is being torn down, allows avoiding expensive operations

重载 USceneComponent .

◆ OnUnregister()

virtual void UPrimitiveComponent::OnUnregister ( )
overridevirtual

Called when a component is unregistered.

Called after DestroyRenderState_Concurrent and OnDestroyPhysicsState are called.

重载 USceneComponent .

被 USkeletalMeshComponent, USkinnedMeshComponent, UStaticMeshComponent, UVectorFieldComponent, UParticleSystemComponent , 以及 UWidgetComponent 重载.

◆ OverlapComponent()

virtual bool UPrimitiveComponent::OverlapComponent ( const FVector &  Pos,
const FQuat &  Rot,
const FCollisionShape &  CollisionShape 
)
virtual

Test the collision of the supplied shape at the supplied location, and determine if it overlaps this component.

参数
PosLocation to place PrimComp geometry at
RotRotation of PrimComp geometry
CollisionShapeShape of collision of PrimComp geometry
返回
true if PrimComp overlaps this component at the specified location/rotation

被 USkeletalMeshComponent 重载.

◆ PostDuplicate()

virtual void UPrimitiveComponent::PostDuplicate ( bool  bDuplicateForPIE)
overridevirtual

Called after duplication & serialization and before PostLoad.

Used to e.g. make sure UStaticMesh's UModel gets copied as well. Note: NOT called on components on actor duplication (alt-drag or copy-paste). Use PostEditImport as well to cover that case.

重载 UObject .

◆ PostInitProperties()

virtual void UPrimitiveComponent::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.

重载 UActorComponent .

被 UStaticMeshComponent 重载.

◆ PostLoad()

virtual void UPrimitiveComponent::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.

重载 UActorComponent .

被 UCapsuleComponent, UModelComponent, USkeletalMeshComponent, USplineComponent, UStaticMeshComponent , 以及 UParticleSystemComponent 重载.

◆ PushHoveredToProxy()

void UPrimitiveComponent::PushHoveredToProxy ( const bool  bInHovered)

Pushes new hover state to the render thread primitive proxy

参数
bInHovered- true if the proxy should display as if hovered

◆ PutRigidBodyToSleep()

void UPrimitiveComponent::PutRigidBodyToSleep ( FName  BoneName = NAME_None)

Force a single body back to sleep.

参数
BoneNameIf a SkeletalMeshComponent, name of body to put to sleep. 'None' indicates root body.

◆ RigidBodyIsAwake()

bool UPrimitiveComponent::RigidBodyIsAwake ( FName  BoneName = NAME_None) const

Returns if a single body is currently awake and simulating.

参数
BoneNameIf a SkeletalMeshComponent, name of body to return wakeful state from. 'None' indicates root body.

◆ ScaleByMomentOfInertia()

virtual FVector UPrimitiveComponent::ScaleByMomentOfInertia ( FVector  InputVector,
FName  BoneName = NAME_None 
) const
virtual

Scales the given vector by the world space moment of inertia.

Useful for computing the torque needed to rotate an object.

◆ SendRenderTransform_Concurrent()

virtual void UPrimitiveComponent::SendRenderTransform_Concurrent ( )
overridevirtual

Called to send a transform update for this component to the rendering thread

警告
This is called concurrently on multiple threads (but never the same component concurrently)

重载 UActorComponent .

被 UVectorFieldComponent , 以及 UParticleSystemComponent 重载.

◆ Serialize()

virtual void UPrimitiveComponent::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.

重载 UActorComponent .

被 UInstancedStaticMeshComponent, UModelComponent, USkeletalMeshComponent, USkinnedMeshComponent, USplineComponent, UStaticMeshComponent, UParticleSystemComponent , 以及 UWidgetComponent 重载.

◆ SetAllPhysicsAngularVelocityInDegrees()

void UPrimitiveComponent::SetAllPhysicsAngularVelocityInDegrees ( const FVector &  NewAngVel,
bool  bAddToCurrent = false 
)
inline

Set the angular velocity of all bodies in this component.

参数
NewAngVelNew angular velocity to apply to physics, in degrees per second.
bAddToCurrentIf true, NewAngVel is added to the existing angular velocity of all bodies.

◆ SetAllPhysicsAngularVelocityInRadians()

virtual void UPrimitiveComponent::SetAllPhysicsAngularVelocityInRadians ( const FVector &  NewAngVel,
bool  bAddToCurrent = false 
)
virtual

Set the angular velocity of all bodies in this component.

参数
NewAngVelNew angular velocity to apply to physics, in radians per second.
bAddToCurrentIf true, NewAngVel is added to the existing angular velocity of all bodies.

被 USkeletalMeshComponent 重载.

◆ SetAllPhysicsLinearVelocity()

virtual void UPrimitiveComponent::SetAllPhysicsLinearVelocity ( FVector  NewVel,
bool  bAddToCurrent = false 
)
virtual

Set the linear velocity of all bodies in this component.

参数
NewVelNew linear velocity to apply to physics.
bAddToCurrentIf true, NewVel is added to the existing velocity of the body.

被 USkeletalMeshComponent 重载.

◆ SetAllPhysicsPosition()

virtual void UPrimitiveComponent::SetAllPhysicsPosition ( FVector  NewPos)
virtual

Set the position of all bodies in this component.

If a SkeletalMeshComponent, the root body will be placed at the desired position, and the same delta is applied to all other bodies.

参数
NewPosNew position for the body

被 USkeletalMeshComponent 重载.

◆ SetAllPhysicsRotation() [1/2]

virtual void UPrimitiveComponent::SetAllPhysicsRotation ( const FQuat &  NewRot)
virtual

Set the rotation of all bodies in this component.

If a SkeletalMeshComponent, the root body will be changed to the desired orientation, and the same delta is applied to all other bodies.

参数
NewRotNew orienatation for the body

被 USkeletalMeshComponent 重载.

◆ SetAllPhysicsRotation() [2/2]

virtual void UPrimitiveComponent::SetAllPhysicsRotation ( FRotator  NewRot)
virtual

Set the rotation of all bodies in this component.

If a SkeletalMeshComponent, the root body will be changed to the desired orientation, and the same delta is applied to all other bodies.

参数
NewRotNew orienatation for the body

被 USkeletalMeshComponent 重载.

◆ SetBoundsScale()

void UPrimitiveComponent::SetBoundsScale ( float  NewBoundsScale = 1.f)

Scale the bounds of this object, used for frustum culling.

Useful for features like WorldPositionOffset.

◆ SetCenterOfMass()

void UPrimitiveComponent::SetCenterOfMass ( FVector  CenterOfMassOffset,
FName  BoneName = NAME_None 
)

Set the center of mass of a single body.

This will offset the physx-calculated center of mass. Note that in the case where multiple bodies are attached together, the center of mass will be set for the entire group.

参数
CenterOfMassOffsetUser specified offset for the center of mass of this object, from the calculated location.
BoneNameIf a SkeletalMeshComponent, name of body to set center of mass of. 'None' indicates root body.

◆ SetCollisionObjectType()

virtual void UPrimitiveComponent::SetCollisionObjectType ( ECollisionChannel  Channel)
virtual

Changes the collision channel that this object uses when it moves

参数
ChannelThe new channel for this component to use

被 USkeletalMeshComponent 重载.

◆ SetCollisionProfileName()

virtual void UPrimitiveComponent::SetCollisionProfileName ( FName  InCollisionProfileName,
bool  bUpdateOverlaps = true 
)
virtual

Set Collision Profile Name This function is called by constructors when they set ProfileName This will change current CollisionProfileName to be this, and overwrite Collision Setting

参数
InCollisionProfileName: New Profile Name

被 UStaticMeshComponent 重载.

◆ SetCollisionResponseToAllChannels()

virtual void UPrimitiveComponent::SetCollisionResponseToAllChannels ( ECollisionResponse  NewResponse)
virtual

Changes all ResponseToChannels container for this PrimitiveComponent.

to be NewResponse

参数
NewResponseWhat the new response should be to the supplied Channel

◆ SetCollisionResponseToChannel()

virtual void UPrimitiveComponent::SetCollisionResponseToChannel ( ECollisionChannel  Channel,
ECollisionResponse  NewResponse 
)
virtual

Changes a member of the ResponseToChannels container for this PrimitiveComponent.

参数
ChannelThe channel to change the response of
NewResponseWhat the new response should be to the supplied Channel

◆ SetCollisionResponseToChannels()

virtual void UPrimitiveComponent::SetCollisionResponseToChannels ( const FCollisionResponseContainer &  NewReponses)
virtual

Changes the whole ResponseToChannels container for this PrimitiveComponent.

参数
NewResponsesNew set of responses for this component

◆ SetConstraintMode()

virtual void UPrimitiveComponent::SetConstraintMode ( EDOFMode::Type  ConstraintMode)
virtual

Sets the constraint mode of the component.

参数
ConstraintModeThe type of constraint to use.

◆ SetCullDistance()

void UPrimitiveComponent::SetCullDistance ( float  NewCullDistance)

Changes the value of CullDistance.

参数
NewCullDistance- The value to assign to CullDistance.

◆ SetCustomPrimitiveDataFloat()

void UPrimitiveComponent::SetCustomPrimitiveDataFloat ( int32  DataIndex,
float  Value 
)

Set custom primitive data at index DataIndex.

This sets the run-time data only, so it doesn't serialize.

◆ SetCustomPrimitiveDataVector2()

void UPrimitiveComponent::SetCustomPrimitiveDataVector2 ( int32  DataIndex,
FVector2D  Value 
)

Set custom primitive data, two floats at once, from index DataIndex to index DataIndex + 1.

This sets the run-time data only, so it doesn't serialize.

◆ SetCustomPrimitiveDataVector3()

void UPrimitiveComponent::SetCustomPrimitiveDataVector3 ( int32  DataIndex,
FVector  Value 
)

Set custom primitive data, three floats at once, from index DataIndex to index DataIndex + 2.

This sets the run-time data only, so it doesn't serialize.

◆ SetCustomPrimitiveDataVector4()

void UPrimitiveComponent::SetCustomPrimitiveDataVector4 ( int32  DataIndex,
FVector4  Value 
)

Set custom primitive data, four floats at once, from index DataIndex to index DataIndex + 3.

This sets the run-time data only, so it doesn't serialize.

◆ SetDepthPriorityGroup()

void UPrimitiveComponent::SetDepthPriorityGroup ( ESceneDepthPriorityGroup  NewDepthPriorityGroup)

Changes the value of DepthPriorityGroup.

参数
NewDepthPriorityGroup- The value to assign to DepthPriorityGroup.

◆ SetEnableGravity()

virtual void UPrimitiveComponent::SetEnableGravity ( bool  bGravityEnabled)
virtual

Enables/disables whether this component is affected by gravity.

This applies only to components with bSimulatePhysics set to true.

被 USkeletalMeshComponent 重载.

◆ SetMassOverrideInKg()

virtual void UPrimitiveComponent::SetMassOverrideInKg ( FName  BoneName = NAME_None,
float  MassInKg = 1.f,
bool  bOverrideMass = true 
)
virtual

Override the mass (in Kg) of a single physics body.

Note that in the case where multiple bodies are attached together, the override mass will be set for the entire group. Set the Override Mass to false if you want to reset the body's mass to the auto-calculated physx mass.

◆ SetMaterial()

virtual void UPrimitiveComponent::SetMaterial ( int32  ElementIndex,
class UMaterialInterface *  Material 
)
virtual

Changes the material applied to an element of the mesh.

参数
ElementIndex- The element to access the material of.
返回
the material used by the indexed element of this mesh.

被 UMeshComponent, UParticleSystemComponent , 以及 UWidgetComponent 重载.

◆ SetMaterialByName()

virtual void UPrimitiveComponent::SetMaterialByName ( FName  MaterialSlotName,
class UMaterialInterface *  Material 
)
virtual

Changes the material applied to an element of the mesh.

参数
MaterialSlotName- The slot name to access the material of.
返回
the material used by the indexed element of this mesh.

被 UMeshComponent , 以及 UParticleSystemComponent 重载.

◆ SetPhysicsAngularVelocity()

void UPrimitiveComponent::SetPhysicsAngularVelocity ( FVector  NewAngVel,
bool  bAddToCurrent = false,
FName  BoneName = NAME_None 
)
inline

Set the angular velocity of a single body.

This should be used cautiously - it may be better to use AddTorque or AddImpulse.

参数
NewAngVelNew angular velocity to apply to body, in degrees per second.
bAddToCurrentIf true, NewAngVel is added to the existing angular velocity of the body.
BoneNameIf a SkeletalMeshComponent, name of body to modify angular velocity of. 'None' indicates root body.

◆ SetPhysicsAngularVelocityInDegrees()

void UPrimitiveComponent::SetPhysicsAngularVelocityInDegrees ( FVector  NewAngVel,
bool  bAddToCurrent = false,
FName  BoneName = NAME_None 
)
inline

Set the angular velocity of a single body.

This should be used cautiously - it may be better to use AddTorque or AddImpulse.

参数
NewAngVelNew angular velocity to apply to body, in degrees per second.
bAddToCurrentIf true, NewAngVel is added to the existing angular velocity of the body.
BoneNameIf a SkeletalMeshComponent, name of body to modify angular velocity of. 'None' indicates root body.

◆ SetPhysicsAngularVelocityInRadians()

virtual void UPrimitiveComponent::SetPhysicsAngularVelocityInRadians ( FVector  NewAngVel,
bool  bAddToCurrent = false,
FName  BoneName = NAME_None 
)
virtual

Set the angular velocity of a single body.

This should be used cautiously - it may be better to use AddTorque or AddImpulse.

参数
NewAngVelNew angular velocity to apply to body, in radians per second.
bAddToCurrentIf true, NewAngVel is added to the existing angular velocity of the body.
BoneNameIf a SkeletalMeshComponent, name of body to modify angular velocity of. 'None' indicates root body.

◆ SetPhysicsLinearVelocity()

virtual void UPrimitiveComponent::SetPhysicsLinearVelocity ( FVector  NewVel,
bool  bAddToCurrent = false,
FName  BoneName = NAME_None 
)
virtual

Set the linear velocity of a single body.

This should be used cautiously - it may be better to use AddForce or AddImpulse.

参数
NewVelNew linear velocity to apply to physics.
bAddToCurrentIf true, NewVel is added to the existing velocity of the body.
BoneNameIf a SkeletalMeshComponent, name of body to modify velocity of. 'None' indicates root body.

◆ SetPhysicsMaxAngularVelocity()

void UPrimitiveComponent::SetPhysicsMaxAngularVelocity ( float  NewMaxAngVel,
bool  bAddToCurrent = false,
FName  BoneName = NAME_None 
)
inline

Set the maximum angular velocity of a single body.

参数
NewMaxAngVelNew maximum angular velocity to apply to body, in degrees per second.
bAddToCurrentIf true, NewMaxAngVel is added to the existing maximum angular velocity of the body.
BoneNameIf a SkeletalMeshComponent, name of body to modify maximum angular velocity of. 'None' indicates root body.

◆ SetPhysicsMaxAngularVelocityInDegrees()

void UPrimitiveComponent::SetPhysicsMaxAngularVelocityInDegrees ( float  NewMaxAngVel,
bool  bAddToCurrent = false,
FName  BoneName = NAME_None 
)
inline

Set the maximum angular velocity of a single body.

参数
NewMaxAngVelNew maximum angular velocity to apply to body, in degrees per second.
bAddToCurrentIf true, NewMaxAngVel is added to the existing maximum angular velocity of the body.
BoneNameIf a SkeletalMeshComponent, name of body to modify maximum angular velocity of. 'None' indicates root body.

◆ SetPhysicsMaxAngularVelocityInRadians()

void UPrimitiveComponent::SetPhysicsMaxAngularVelocityInRadians ( float  NewMaxAngVel,
bool  bAddToCurrent = false,
FName  BoneName = NAME_None 
)

Set the maximum angular velocity of a single body.

参数
NewMaxAngVelNew maximum angular velocity to apply to body, in radians per second.
bAddToCurrentIf true, NewMaxAngVel is added to the existing maximum angular velocity of the body.
BoneNameIf a SkeletalMeshComponent, name of body to modify maximum angular velocity of. 'None' indicates root body.

◆ SetPhysMaterialOverride()

virtual void UPrimitiveComponent::SetPhysMaterialOverride ( class UPhysicalMaterial *  NewPhysMaterial)
virtual

Changes the current PhysMaterialOverride for this component.

Note that if physics is already running on this component, this will not alter its mass/inertia etc,
it will only change its surface properties like friction.

被 USkeletalMeshComponent 重载.

◆ SetSimulatePhysics()

virtual void UPrimitiveComponent::SetSimulatePhysics ( bool  bSimulate)
virtual

Sets whether or not a single body should use physics simulation, or should be 'fixed' (kinematic).

Note that if this component is currently attached to something, beginning simulation will detach it.

参数
bSimulateNew simulation state for single body

被 USkeletalMeshComponent 重载.

◆ SetViewOwnerDepthPriorityGroup()

void UPrimitiveComponent::SetViewOwnerDepthPriorityGroup ( bool  bNewUseViewOwnerDepthPriorityGroup,
ESceneDepthPriorityGroup  NewViewOwnerDepthPriorityGroup 
)

Changes the value of bUseViewOwnerDepthPriorityGroup and ViewOwnerDepthPriorityGroup.

参数
bNewUseViewOwnerDepthPriorityGroup- The value to assign to bUseViewOwnerDepthPriorityGroup.
NewViewOwnerDepthPriorityGroup- The value to assign to ViewOwnerDepthPriorityGroup.

◆ ShouldComponentAddToScene()

bool UPrimitiveComponent::ShouldComponentAddToScene ( ) const

Looking at various values of the component, determines if this component should be added to the scene

返回
true if the component is visible and should be added to the scene, false otherwise

◆ ShouldCreatePhysicsState()

virtual bool UPrimitiveComponent::ShouldCreatePhysicsState ( ) const
overridevirtual

Return true if CreatePhysicsState() should be called.

Ideally CreatePhysicsState() should always succeed if this returns true, but this isn't currently the case

重载 UActorComponent .

被 USkeletalMeshComponent, UFieldSystemComponent , 以及 UGeometryCollectionComponent 重载.

◆ ShouldRecreateProxyOnUpdateTransform()

virtual bool UPrimitiveComponent::ShouldRecreateProxyOnUpdateTransform ( ) const
inlinevirtual

Determines whether the proxy for this primitive type needs to be recreated whenever the primitive moves.

返回
true to recreate the proxy when UpdateTransform is called.

被 UModelComponent , 以及 UStaticMeshComponent 重载.

◆ SweepComponent()

virtual bool UPrimitiveComponent::SweepComponent ( FHitResult &  OutHit,
const FVector  Start,
const FVector  End,
const FQuat &  ShapeWorldRotation,
const FCollisionShape &  CollisionShape,
bool  bTraceComplex = false 
)
virtual

Trace a shape against just this component.

参数
OutHitInformation about hit against this component, if true is returned
StartStart location of the box
EndEnd location of the box
ShapeWorldRotationThe rotation applied to the collision shape in world space.
CollisionShapeCollision Shape
bTraceComplexWhether or not to trace complex
返回
true if a hit is found

被 USkeletalMeshComponent 重载.

◆ SyncComponentToRBPhysics()

void UPrimitiveComponent::SyncComponentToRBPhysics ( )

Move this component to match the physics rigid body pose.

Note, a warning will be generated if you call this function on a component that is attached to something

◆ UnWeldChildren()

virtual void UPrimitiveComponent::UnWeldChildren ( )
virtual

Unwelds the children of this component.

Attachment is maintained

◆ UnWeldFromParent()

virtual void UPrimitiveComponent::UnWeldFromParent ( )
virtual

UnWelds this component from its parent component.

Attachment is maintained (DetachFromParent automatically unwelds)

◆ UpdateOverlapsImpl()

virtual bool UPrimitiveComponent::UpdateOverlapsImpl ( const TOverlapArrayView *  NewPendingOverlaps = nullptr,
bool  bDoNotifies = true,
const TOverlapArrayView *  OverlapsAtEndLocation = nullptr 
)
overridevirtual

Queries world and updates overlap tracking state for this component.

参数
NewPendingOverlapsAn ordered list of components that the MovedComponent overlapped during its movement (eg. generated during a sweep). Only used to add potentially new overlaps. Might not be overlapping them now.
bDoNotifiesTrue to dispatch being/end overlap notifications when these events occur.
OverlapsAtEndLocationIf non-null, the given list of overlaps will be used as the overlaps for this component at the current location, rather than checking for them with a scene query. Generally this should only be used if this component is the RootComponent of the owning actor and overlaps with other descendant components have been verified.
返回
True if we can skip calling this in the future (i.e. no useful work is being done.)

重载 USceneComponent .

被 USkeletalMeshComponent , 以及 USkinnedMeshComponent 重载.

◆ UpdatePhysicsVolume()

virtual void UPrimitiveComponent::UpdatePhysicsVolume ( bool  bTriggerNotifiers)
overridevirtual

Update current physics volume for this component, if bShouldUpdatePhysicsVolume is true.

Overridden to use the overlaps to find the physics volume.

重载 USceneComponent .

◆ WakeRigidBody()

virtual void UPrimitiveComponent::WakeRigidBody ( FName  BoneName = NAME_None)
virtual

'Wake' physics simulation for a single body.

参数
BoneNameIf a SkeletalMeshComponent, name of body to wake. 'None' indicates root body.

◆ WasRecentlyRendered()

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

Returns true if this component 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.

◆ WeldTo()

virtual void UPrimitiveComponent::WeldTo ( class USceneComponent *  InParent,
FName  InSocketName = NAME_None 
)
virtual

Welds this component to another scene component, optionally at a named socket.

Component is automatically attached if not already Welding allows the child physics object to become physically connected to its parent. This is useful for creating compound rigid bodies with correct mass distribution.

参数
InParentthe component to be physically attached to
InSocketNameoptional socket to attach component to

◆ WeldToImplementation()

virtual bool UPrimitiveComponent::WeldToImplementation ( USceneComponent *  InParent,
FName  ParentSocketName = NAME_None,
bool  bWeldSimulatedChild = true 
)
virtual

Does the actual work for welding.

返回
true if did a true weld of shapes, meaning body initialization is not needed

类成员变量说明

◆ AttachmentCounter

FThreadSafeCounter UPrimitiveComponent::AttachmentCounter

Incremented by the main thread before being attached to the scene, decremented by the rendering thread after removal.

This counter exists to assert that operations are safe in order to help avoid race conditions.

      *** Runtime logic should NEVER rely on this value. ***

The only safe assertions to make are:

AttachmentCounter == 0: The primitive is not exposed to the rendering
                        thread, it is safe to modify shared members.
                        This assertion is valid ONLY from the main thread.

AttachmentCounter >= 1: The primitive IS exposed to the rendering
                        thread and therefore shared members must not
                        be modified. This assertion may be made from
                        any thread. Note that it is valid and expected
                        for AttachmentCounter to be larger than 1, e.g.
                        during reattachment.

◆ bAffectDistanceFieldLighting

uint8 UPrimitiveComponent::bAffectDistanceFieldLighting

Controls whether the primitive should affect dynamic distance field lighting methods.

This flag is only used if CastShadow is true.

◆ bAffectDynamicIndirectLighting

uint8 UPrimitiveComponent::bAffectDynamicIndirectLighting

Controls whether the primitive should inject light into the Light Propagation Volume.

This flag is only used if CastShadow is true.

◆ bAlwaysCreatePhysicsState

uint8 UPrimitiveComponent::bAlwaysCreatePhysicsState

Indicates if we'd like to create physics state all the time (for collision and simulation).

If you set this to false, it still will create physics state if collision or simulation activated. This can help performance if you'd like to avoid overhead of creating physics state when triggers

◆ bCastCinematicShadow

uint8 UPrimitiveComponent::bCastCinematicShadow

Whether this component should cast shadows from lights that have bCastShadowsFromCinematicObjectsOnly enabled.

This is useful for characters in a cinematic with special cinematic lights, where the cost of shadowmap rendering of the environment is undesired.

◆ bCastContactShadow

uint8 UPrimitiveComponent::bCastContactShadow

Whether the object should cast contact shadows.

This flag is only used if CastShadow is true.

◆ bCastDynamicShadow

uint8 UPrimitiveComponent::bCastDynamicShadow

Controls whether the primitive should cast shadows in the case of non precomputed shadowing.

This flag is only used if CastShadow is true.

◆ bCastHiddenShadow

uint8 UPrimitiveComponent::bCastHiddenShadow

If true, the primitive will cast shadows even if bHidden is true.

Controls whether the primitive should cast shadows when hidden. This flag is only used if CastShadow is true.

◆ bCastInsetShadow

uint8 UPrimitiveComponent::bCastInsetShadow

Whether this component should create a per-object shadow that gives higher effective shadow resolution.

Useful for cinematic character shadowing. Assumed to be enabled if bSelfShadowOnly is enabled.

◆ bCastStaticShadow

uint8 UPrimitiveComponent::bCastStaticShadow

Whether the object should cast a static shadow from shadow casting lights.

This flag is only used if CastShadow is true.

◆ bCastVolumetricTranslucentShadow

uint8 UPrimitiveComponent::bCastVolumetricTranslucentShadow

Whether the object should cast a volumetric translucent shadow.

Volumetric translucent shadows are useful for primitives with smoothly changing opacity like particles representing a volume, But have artifacts when used on highly opaque surfaces.

◆ bIgnoreStreamingManagerUpdate

uint8 UPrimitiveComponent::bIgnoreStreamingManagerUpdate
mutable

When true, texture streaming manager won't update the component state.

Used to perform early exits when updating component.

◆ bLightAsIfStatic_DEPRECATED

uint8 UPrimitiveComponent::bLightAsIfStatic_DEPRECATED
弃用:
Replaced by LightmapType

◆ bLightAttachmentsAsGroup

uint8 UPrimitiveComponent::bLightAttachmentsAsGroup

Whether to light this component and any attachments as a group.

This only has effect on the root component of an attachment tree. When enabled, attached component shadowing settings like bCastInsetShadow, bCastVolumetricTranslucentShadow, etc, will be ignored. This is useful for improving performance when multiple movable components are attached together.

◆ bMultiBodyOverlap

uint8 UPrimitiveComponent::bMultiBodyOverlap

If true, this component will generate individual overlaps for each overlapping physics body if it is a multi-body component.

When false, this component will generate only one overlap, regardless of how many physics bodies it has and how many of them are overlapping another component/body. This flag has no influence on single body components.

◆ bNeverDistanceCull

uint8 UPrimitiveComponent::bNeverDistanceCull

When enabled this object will not be culled by distance.

This is ignored if a child of a HLOD.

◆ BoundsScale

float UPrimitiveComponent::BoundsScale

Scales the bounds of the object.

This is useful when using World Position Offset to animate the vertices of the object outside of its bounds. Warning: Increasing the bounds of an object will reduce performance and shadow quality! Currently only used by StaticMeshComponent and SkeletalMeshComponent.

◆ bReceiveMobileCSMShadows

uint8 UPrimitiveComponent::bReceiveMobileCSMShadows

Mobile only: If disabled this component will not receive CSM shadows.

(Components that do not receive CSM may have reduced shading cost)

◆ bReplicatePhysicsToAutonomousProxy

uint8 UPrimitiveComponent::bReplicatePhysicsToAutonomousProxy

True if physics should be replicated to autonomous proxies.

This should be true for server-authoritative simulations, and false for client authoritative simulations.

◆ bReturnMaterialOnMove

uint8 UPrimitiveComponent::bReturnMaterialOnMove

If true, component sweeps will return the material in their hit result.

参见
MoveComponent(), FHitResult

◆ bSelfShadowOnly

uint8 UPrimitiveComponent::bSelfShadowOnly

When enabled, the component will only cast a shadow on itself and not other components in the world.


This is especially useful for first person weapons, and forces bCastInsetShadow to be enabled.

◆ bSingleSampleShadowFromStationaryLights

uint8 UPrimitiveComponent::bSingleSampleShadowFromStationaryLights

Whether the whole component should be shadowed as one from stationary lights, which makes shadow receiving much cheaper.

When enabled shadowing data comes from the volume lighting samples precomputed by Lightmass, which are very sparse. This is currently only used on stationary directional lights.

◆ bTraceComplexOnMove

uint8 UPrimitiveComponent::bTraceComplexOnMove

If true, component sweeps with this component should trace against complex collision during movement (for example, each triangle of a mesh).

If false, collision will be resolved against simple collision bounds instead.

参见
MoveComponent()

◆ bTreatAsBackgroundForOcclusion

uint8 UPrimitiveComponent::bTreatAsBackgroundForOcclusion

Treat this primitive as part of the background for occlusion purposes.

This can be used as an optimization to reduce the cost of rendering skyboxes, large ground planes that are part of the vista, etc.

◆ bUseAsOccluder

uint8 UPrimitiveComponent::bUseAsOccluder

Whether to render the primitive in the depth only pass.


This should generally be true for all objects, and let the renderer make decisions about whether to render objects in the depth only pass.

待办事项:
  • if any rendering features rely on a complete depth only pass, this variable needs to go away.

◆ bVisibleInRayTracing

uint8 UPrimitiveComponent::bVisibleInRayTracing

If true, this component will be visible in ray tracing effects.

Turning this off will remove it from ray traced reflections, shadows, etc.

◆ CachedMaxDrawDistance

float UPrimitiveComponent::CachedMaxDrawDistance

The distance to cull this primitive at.


A CachedMaxDrawDistance of 0 indicates that the primitive should not be culled by distance.

◆ CanCharacterStepUpOn

TEnumAsByte<enum ECanBeCharacterBase> UPrimitiveComponent::CanCharacterStepUpOn

Determine whether a Character can step up onto this component.

This controls whether they can try to step up on it when they bump in to it, not whether they can walk on it after landing on it.

参见
FWalkableSlopeOverride

◆ GlobalOverlapEventsCounter

uint32 UPrimitiveComponent::GlobalOverlapEventsCounter
static

Count of all component overlap events (begin or end) ever generated for any components.

Changes to this number within a scope can also be a simple way to know if any events were triggered. It can also be useful for identifying performance issues due to high numbers of events.

◆ IndirectLightingCacheQuality

TEnumAsByte<EIndirectLightingCacheQuality> UPrimitiveComponent::IndirectLightingCacheQuality

Quality of indirect lighting for Movable primitives.

This has a large effect on Indirect Lighting Cache update time.

◆ LDMaxDrawDistance

float UPrimitiveComponent::LDMaxDrawDistance

Max draw distance exposed to LDs.

The real max draw distance is the min (disregarding 0) of this and volumes affecting this object.

◆ LightingChannels

FLightingChannels UPrimitiveComponent::LightingChannels

Channels that this component should be in.

Lights with matching channels will affect the component.
These channels only apply to opaque materials, direct lighting, and dynamic lighting and shadowing.

◆ LpvBiasMultiplier

float UPrimitiveComponent::LpvBiasMultiplier

Multiplier used to scale the Light Propagation Volume light injection bias, to reduce light bleeding.

Set to 0 for no bias, 1 for default or higher for increased biasing (e.g. for thin geometry such as walls)

◆ MoveIgnoreActors

TArray<AActor*> UPrimitiveComponent::MoveIgnoreActors

Set of actors to ignore during component sweeps in MoveComponent().

All components owned by these actors will be ignored when this component moves or updates overlaps. Components on the other Actor may also need to be told to do the same when they move. Does not affect movement of this component when simulating physics.

参见
IgnoreActorWhenMoving()

◆ MoveIgnoreComponents

TArray<UPrimitiveComponent*> UPrimitiveComponent::MoveIgnoreComponents

Set of components to ignore during component sweeps in MoveComponent().

These components will be ignored when this component moves or updates overlaps. The other components may also need to be told to do the same when they move. Does not affect movement of this component when simulating physics.

参见
IgnoreComponentWhenMoving()

◆ OnComponentBeginOverlap

FComponentBeginOverlapSignature UPrimitiveComponent::OnComponentBeginOverlap

Event called when something starts to overlaps this component, 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.

注解
Both this component and the other one must have GetGenerateOverlapEvents() set to true to generate overlap events.
When receiving an overlap from another object's movement, the directions of 'Hit.Normal' and 'Hit.ImpactNormal' will be adjusted to indicate force from the other object against this object.

◆ OnComponentEndOverlap

FComponentEndOverlapSignature UPrimitiveComponent::OnComponentEndOverlap

Event called when something stops overlapping this component

注解
Both this component and the other one must have GetGenerateOverlapEvents() set to true to generate overlap events.

◆ OnComponentHit

FComponentHitSignature UPrimitiveComponent::OnComponentHit

Event called when a component 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 for this component.
When receiving a hit from another object's movement, 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.

◆ RuntimeVirtualTextures

TArray<URuntimeVirtualTexture*> UPrimitiveComponent::RuntimeVirtualTextures

Array of runtime virtual textures into which we draw the mesh for this actor.

The material also needs to be set up to output to a virtual texture.

◆ TranslucencySortPriority

int32 UPrimitiveComponent::TranslucencySortPriority

Translucent objects with a lower sort priority draw behind objects with a higher priority.

Translucent objects with the same priority are rendered from back-to-front based on their bounds origin. This setting is also used to sort objects being drawn into a runtime virtual texture.

Ignored if the object is not translucent. The default priority is zero. Warning: This should never be set to a non-default value unless you know what you are doing, as it will prevent the renderer from sorting correctly.
It is especially problematic on dynamic gameplay effects.

◆ VirtualTextureCullMips

int8 UPrimitiveComponent::VirtualTextureCullMips = 0

Number of lower mips in the runtime virtual texture to skip for rendering this primitive.

Larger values reduce the effective draw distance in the runtime virtual texture. This culling method doesn't take into account primitive size or virtual texture size.

◆ VirtualTextureMinCoverage

int8 UPrimitiveComponent::VirtualTextureMinCoverage = 0

Set the minimum pixel coverage before culling from the runtime virtual texture.

Larger values reduce the effective draw distance in the runtime virtual texture.


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