| UObjectBase
|
Module |
|
Header |
/Engine/Source/Runtime/Engine/Classes/Components/ActorComponent.h |
Include |
#include "Components/ActorComponent.h" |
class UActorComponent :
public UObject,
public IInterface_AssetUserData
ActorComponent is the base class for components that define reusable behavior that can be added to different types of Actors. ActorComponents that have a transform are known as SceneComponents and those that can be rendered are PrimitiveComponents.
Name | Description | ||
---|---|---|---|
|
AssetUserData |
Array of user data stored with the component |
|
|
uint8: 1 |
bAllowAnyoneToDestroyMe |
Can this component be destroyed (via K2_DestroyComponent) by any parent |
|
uint8: 1 |
bAllowConcurrentTick |
Can we tick this concurrently on other threads? |
|
uint8: 1 |
bAllowReregistration |
Check whether the component class allows reregistration during ReregisterAllComponents |
|
uint8: 1 |
bAutoActivate |
Whether the component is activated at creation or must be explicitly activated. |
|
uint8: 1 |
bAutoRegister |
Does this component automatically register with its owner |
|
uint8: 1 |
bCanEverAffectNavigation |
Whether this component can potentially influence navigation |
|
uint8: 1 |
bEditableWhenInherited |
True if this component can be modified when it was inherited from a parent actor class |
|
uint8: 1 |
bIsEditorOnly |
If true, the component will be excluded from non-editor builds |
|
uint8: 1 |
bNavigationRelevant |
Cached navigation relevancy flag for collision updates |
|
uint8: 1 |
bNetAddressable |
Is this component safe to ID over the network by name? |
|
uint8: 1 |
bNeverNeedsRenderUpdate |
If true, this component never needs a render update. |
|
uint8: 1 |
bPhysicsStateCreated |
If the physics state is currently created for this component |
|
uint8: 1 |
bRegistered |
Indicates if this ActorComponent is currently registered with a scene. |
|
uint8: 1 |
bRenderStateCreated |
If the render state is currently created for this component |
|
uint8: 1 |
bReplicateUsingRegisteredSubObjectList |
When true the replication system will only replicate the registered subobjects list When false the replication system will instead call the virtual ReplicateSubObjects() function where the subobjects need to be manually replicated. |
|
uint8: 1 |
bTickInEditor |
Should this component be ticked in the editor |
|
uint8: 1 |
bWantsInitializeComponent |
If true, we call the virtual InitializeComponent |
|
ComponentTags |
Array of tags that can be used for grouping and categorizing. Can also be accessed from scripting. |
|
|
EComponentCreat... |
CreationMethod |
Describes how a component instance will be created |
|
OnComponentActivated |
Called when the component has been activated, with parameter indicating if it was from a reset |
|
|
OnComponentDeactivated |
Called when the component has been deactivated |
|
|
PrimaryComponentTick |
Main tick function for the Component |
Name | Description | |
---|---|---|
|
UActorComponent ( |
Default UObject constructor that takes an optional ObjectInitializer. |
Name | Description | ||
---|---|---|---|
|
void |
Activate ( |
Activates the SceneComponent, should be overridden by native child classes. |
|
UObject cons... |
AdditionalStatObject() |
Give a readable name for this component, including asset name if applicable |
|
void |
AddReferencedObjects ( |
|
|
void |
AddReplicatedSubObject ( |
Register a SubObject that will get replicated along with the actor component. |
|
void |
AddTickPrerequisiteActor ( |
Make this component tick after PrerequisiteActor |
|
void |
AddTickPrerequisiteComponent ( |
Make this component tick after PrerequisiteComponent. |
|
bool |
AllowReregistration() |
Check whether the component class allows reregistration during ReregisterAllComponents |
|
void |
ApplyWorldOffset ( |
Called by owner actor on position shifting Component should update all relevant data structures to reflect new actor location |
|
void |
AsyncPhysicsTickComponent ( |
Override this function to implement custom logic to be executed every physics step. |
|
void |
BeginPlay() |
Begins Play for the component. |
|
bool |
CanEverAffectNavigation() |
Can this component potentially influence navigation |
|
void |
CheckForErrors() |
Function that gets called from within Map_Check to allow this actor component to check itself for any potential errors and register them with map check dialog. |
|
void |
ClearNeedEndOfFrameUpdate() |
If we belong to a world, clear the request to do a deferred update. |
|
void |
ClearUCSModifiedProperties() |
Clears the component's UCS modified properties |
|
bool |
ComponentHasTag ( |
See if this component contains the supplied tag |
|
bool |
ComponentIsInLevel ( |
Returns true if this actor is contained by TestLevel. |
|
bool |
ComponentIsInPersistentLevel ( |
See if this component is in the persistent level |
|
void |
CreatePhysicsState ( |
Create any physics engine information for this component |
|
void |
CreateRenderState_Concurrent ( |
Used to create any rendering thread information for this component |
|
void |
Deactivate() |
Deactivates the SceneComponent. |
|
void |
DestroyComponent ( |
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 |
DestroyRenderState_Concurrent() |
Used to shut down any rendering thread structure for this component |
|
void |
DestroyReplicatedSubObjectOnRemotePeers ( |
Stop replicating a subobject and tell actor channels to delete the replica of this subobject next time the Actor gets replicated Note it is up to the caller to delete the local object on the authority. |
|
void |
DetermineUCSModifiedProperties() |
Initializes the list of properties that are modified by the UserConstructionScript |
|
void |
DoDeferredRenderUpdates_Concurrent() |
Uses the bRenderStateDirty/bRenderTransformDirty/bRenderInstancesDirty to perform any necessary work on this component. |
|
void |
EndPlay ( |
Ends gameplay for this component. |
|
bool |
ForceActorNonSpatiallyLoaded() |
|
|
void |
GetActorDescProperties ( |
Add properties to the component owner's actor desc. |
|
void |
GetComponentChildElements ( |
Get the logical child elements of this component, if any. |
|
bool |
GetComponentClassCanReplicate() |
Returns true if this type of component can ever replicate, override to disable the default behavior |
|
TStructOnSco... |
GetComponentInstanceData() |
Called before we throw away components during RerunConstructionScripts, to cache any data we wish to persist across that operation |
|
ULevel * |
GetComponentLevel() |
Return the ULevel that this Component is part of. |
|
float |
GetComponentTickInterval() |
Returns the tick interval for this component's primary tick function, which is the frequency in seconds at which it will be executed |
|
TSharedPtr< ... |
GetCustomEditorPreviewWidget() |
If this component is set up to provide a preview window in editor (see GetEditorPreviewInfo), you can use this to customize the preview (to be something other than a world viewport). |
|
TSubclassOf<... |
GetCustomHLODBuilderClass() |
Return the custom HLODBuilder class that should be used to generate HLODs for components of this type. |
|
bool |
GetEditorPreviewInfo ( |
Supplies the editor with a view specific to this component (think a view from a camera components POV, a render, etc.). |
|
bool |
GetIsReplicated() |
Returns whether replication is enabled or not. |
|
uint32 |
GetMarkedForEndOfFrameUpdateState() |
Tracks whether the component has been added to one of the world's end of frame update lists |
|
uint32 |
GetMarkedForPreEndOfFrameSync() |
Tracks whether the component has been added to one of the world's end of frame update lists |
|
ENetMode |
GetNetMode() |
Get the network mode (dedicated server, client, standalone, etc) for this component. |
|
AActor * |
GetOwner() |
Follow the Outer chain to get the AActor that 'Owns' this component |
|
T * |
GetOwner() |
Templated version of GetOwner(), will return nullptr if cast fails |
|
ENetRole |
GetOwnerRole() |
Get the network role of the Owner, or ROLE_None if there is no owner. |
|
GetReadableName() |
Returns a readable name for this component, including the asset name if applicable By default this appends a space plus AdditionalStatObject() |
|
|
const FName |
GetReplicatesPropertyName() |
Gets the property name for bReplicates. |
|
ELifetimeCon... |
GetReplicationCondition() |
Returns the replication condition for the component. |
|
FSceneInterf... |
GetScene() |
Returns the rendering scene associated with this component |
|
FBox |
GetStreamingBounds() |
|
|
void |
GetUCSModifiedProperties |
Returns the list of properties that are modified by the UserConstructionScript |
|
int32 |
GetUCSSerializationIndex() |
Returns the UCS serialization index. |
|
UWorld * |
GetWorld() |
Getter for the cached world pointer, will return null if the component is not actually spawned in a level |
|
void |
HandleCanEverAffectNavigationChange ( |
Makes sure navigation system has up to date information regarding component's navigation relevancy and if it can affect navigation at all |
|
bool |
HasBeenCreated() |
Indicates that OnCreatedComponent has been called, but OnDestroyedComponent has not yet |
|
bool |
HasBeenInitialized() |
Indicates that InitializeComponent has been called, but UninitializeComponent has not yet |
|
bool |
HasBegunPlay() |
Indicates that BeginPlay has been called, but EndPlay has not yet |
|
bool |
HasValidPhysicsState() |
Used to check that DestroyPhysicsState() is working correctly |
|
void |
InitializeComponent() |
Initializes the component. |
|
void |
InvalidateLightingCache() |
Invalidate lighting cache with default options. |
|
void |
InvalidateLightingCacheDetailed ( |
Called when this actor component has moved, allowing it to discard statically cached lighting information. |
|
bool |
IsActive() |
Returns whether the component is active or not |
|
bool |
IsBeingDestroyed() |
Returns whether the component is in the process of being destroyed. |
|
bool |
IsComponentTickEnabled() |
Returns whether this component has tick enabled or not |
|
bool |
IsCreatedByConstructionScript() |
Returns true if instances of this component are created by either the user or simple construction script |
|
bool |
IsEditableWhenInherited() |
True if this component can be modified when it was inherited from a parent actor class |
|
bool |
IsHLODRelevant() |
Override to specify that a component is relevant to the HLOD generation. |
|
bool |
IsNavigationRelevant() |
Override to specify that a component is relevant to the navigation system |
|
bool |
IsNetMode ( |
Test whether net mode is the given mode. |
|
bool |
IsNetSimulating() |
Returns true if we are replicating and this client is not authoritative |
|
bool |
IsNetStartupComponent() |
Returns true if this component was owned by a net startup actor during level load. |
|
bool |
IsOwnerRunningUserConstructionScript() |
See if the owning Actor is currently running the UCS |
|
bool |
IsOwnerSelected() |
Returns whether the component's owner is selected in the editor |
|
bool |
IsPhysicsStateCreated() |
Returns true if the physics 'state' (e.g. physx bodies) are created for this component |
|
bool |
IsReadyForOwnerToAutoDestroy() |
Overridable check for a component to indicate to its Owner that it should prevent the Actor from auto destroying when finished |
|
bool |
IsReadyForReplication() |
Indicates that ReadyForReplication has been called |
|
bool |
IsRegistered() |
See if this component is currently registered |
|
bool |
IsRenderInstancesDirty() |
Is this component's instance data in need of sending to the renderer? |
|
bool |
IsRenderStateCreated() |
Returns true if the render 'state' (e.g. scene proxy) is created for this component |
|
bool |
IsRenderStateDirty() |
Is this component in need of its whole state being sent to the renderer? |
|
bool |
IsRenderTransformDirty() |
Is this component's transform in need of sending to the renderer? |
|
bool |
IsReplicatedSubObjectRegistered ( |
Tells if the object is registered to be replicated by this actor component. |
|
bool |
IsUsingRegisteredSubObjectList() |
Returns if this component is replicating subobjects via the registration list or via the virtual ReplicateSubObjects method. |
|
bool |
IsVisualizationComponent() |
Returns true if this component is only used for visualization, usually a sprite or text |
|
void |
K2_DestroyComponent ( |
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 |
MarkRenderInstancesDirty() |
Marks the instances as dirty - changes to instance transforms/custom data will be sent to the render thread 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 |
|
bool |
NeedsInitialization() |
Convenience method for testing whether or not we are still be constructed / initialized. |
|
void |
OnActorEnableCollisionChanged() |
Called on each component when the Actor's bEnableCollisionChanged flag changes |
|
void |
OnComponentCreated() |
Called when a component is created (not loaded). This can happen in the editor or during gameplay |
|
void |
OnComponentDestroyed ( |
Called when a component is destroyed |
|
void |
OnCreatedFromReplication() |
We're using the same API as IInterface_ActorSubobject, but not using it directly as a size and performance optimization. |
|
void |
OnCreatePhysicsState() |
Used to create any physics engine information for this component |
|
void |
OnDestroyedFromReplication() |
|
|
void |
OnDestroyPhysicsState() |
Used to shut down and physics engine structure for this component |
|
void |
OnEndOfFrameUpdateDuringTick() |
Allows components to handle an EOF update happening mid tick. |
|
void |
OnPreEndOfFrameSync() |
Allows components to wait on outstanding tasks prior to sending EOF update data. |
|
void |
OnRegister() |
Called when a component is registered, after Scene is set, but before CreateRenderState_Concurrent or OnCreatePhysicsState are called. |
|
void |
OnRep_IsActive() |
Handles replication of active state, handles ticking by default but should be overridden as needed |
|
void |
OnUnregister() |
Called when a component is unregistered. |
|
bool |
OwnerNeedsInitialization() |
Convenience method for testing whether or not our owner is still being constructed / initialized. |
|
void |
PostApplyToComponent() |
Called after ApplyToComponent has run. |
|
void |
PreReplication ( |
Called on the component right before replication occurs |
|
void |
ReadyForReplication() |
ReadyForReplication gets called on replicated components when their owning actor is officially ready for replication. |
|
void |
ReceiveAsyncPhysicsTick ( |
Event called every async physics tick if bAsyncPhysicsTickEnabled is true |
|
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 ( |
Blueprint implementable event for when the component ends play, generally via destruction or its Actor's EndPlay. |
|
void |
ReceiveTick ( |
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 ( |
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 |
RegisterComponentTickFunctions ( |
Virtual call chain to register all tick functions |
|
void |
RegisterComponentWithWorld ( |
Registers a component with a specific world, which creates any visual/physical state |
|
void |
RemoveReplicatedSubObject ( |
Unregister a SubObject to stop replicating it's properties to clients. |
|
void |
RemoveTickPrerequisiteActor ( |
Remove tick dependency on PrerequisiteActor. |
|
void |
RemoveTickPrerequisiteComponent ( |
Remove tick dependency on PrerequisiteComponent. |
|
void |
RemoveUCSModifiedProperties |
Removes specified properties from the list of UCS-modified properties |
|
bool |
ReplicateSubobjects ( |
Allows a component to replicate other subobject on the actor. |
|
bool |
RequiresGameThreadEndOfFrameRecreate() |
Return true if this component requires end of frame recreates to happen from the game thread. |
|
bool |
RequiresGameThreadEndOfFrameUpdates() |
Return true if this component requires end of frame updates to happen from the game thread. |
|
bool |
RequiresPreEndOfFrameSync() |
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. |
|
void |
SendRenderDynamicData_Concurrent() |
Called to send dynamic data for this component to the rendering thread |
|
void |
SendRenderInstanceData_Concurrent() |
Called to send instance data for this component to the rendering thread |
|
void |
SendRenderTransform_Concurrent() |
Called to send a transform update for this component to the rendering thread |
|
void |
SetActive ( |
Sets whether the component is active or not |
|
void |
SetActiveFlag ( |
Sets the value of bIsActive without causing other side effects to this instance. |
|
void |
SetAsyncPhysicsTickEnabled ( |
Sets bAsyncPhysicsTickEnabled which determines whether to use use the async physics tick with this component. |
|
void |
SetAutoActivate ( |
Sets whether the component should be auto activate or not. Only safe during construction scripts. |
|
void |
SetCanEverAffectNavigation ( |
Set value of bCanEverAffectNavigation flag and update navigation octree if needed |
|
void |
SetComponentTickEnabled ( |
Set this component's tick functions to be enabled or disabled. |
|
void |
SetComponentTickEnabledAsync ( |
Spawns a task on GameThread that will call SetComponentTickEnabled |
|
void |
SetComponentTickInterval ( |
Sets the tick interval for this component's primary tick function. |
|
void |
SetComponentTickIntervalAndCooldown ( |
Sets the tick interval for this component's primary tick function. |
|
void |
SetIsNetStartupComponent ( |
This should only be called by the engine in ULevel::InitializeNetworkActors to initialize bIsNetStartupComponent. |
|
void |
SetIsReplicated ( |
Enable or disable replication. |
|
void |
SetIsReplicatedByDefault ( |
Sets the value of bReplicates without causing other side effects to this instance. |
|
void |
SetIsVisualizationComponent ( |
Sets if this component is only used for visualization |
|
void |
SetNetAddressable() |
This signifies the component can be ID'd by name over the network. |
|
void |
SetPackageExternal ( |
|
|
void |
SetTickableWhenPaused ( |
Sets whether this component can tick when paused. |
|
void |
SetTickGroup ( |
Changes the ticking group for this component |
|
bool |
SetupActorComponentTickFunction ( |
Set up a tick function for a component in the standard way. |
|
bool |
ShouldActivate() |
Return true if this component is in a state where it can be activated normally. |
|
bool |
ShouldCreatePhysicsState() |
Return true if CreatePhysicsState() should be called. |
|
bool |
ShouldCreateRenderState() |
Return true if CreateRenderState() should be called |
|
void |
TearOffReplicatedSubObjectOnRemotePeers ( |
Stop replicating a subobject and tell actor channels who spawned a replica of this subobject to release ownership over it. |
|
void |
TickComponent ( |
Function called every frame on this ActorComponent. |
|
void |
ToggleActive() |
Toggles the active state of the component |
|
void |
UninitializeComponent() |
Handle this component being Uninitialized. |
|
void |
UnregisterComponent() |
Unregister this component, destroying any rendering/physics state. |
|
void |
UpdateComponentToWorld ( |
Recalculate the value of our component to world transform |
Name | Description | ||
---|---|---|---|
|
void |
BeginDestroy() |
Called before destroying the object. |
|
bool |
CallRemoteFunction ( |
Call the actor's function remotely |
|
bool |
CanEditChange ( |
Called by the editor to query whether a property of this object is allowed to be modified. |
|
int32 |
GetFunctionCallspace |
Return the space this function should be called. |
|
void |
GetLifetimeReplicatedProps ( |
Returns properties that are replicated for the lifetime of the actor channel |
|
bool |
IsEditorOnly() |
Returns whether this component is an editor-only object or not |
|
bool |
IsNameStableForNetworking() |
IsNameStableForNetworking means an object can be referred to its path name (relative to outer) over the network |
|
bool |
IsSelectedInEditor() |
Test the selection state of a UObject |
|
bool |
IsSupportedForNetworking() |
IsSupportedForNetworking means an object can be referenced over the network |
|
void |
MarkAsEditorOnlySubobject() |
Called during component creation to mark this component as editor only |
|
bool |
Modify ( |
Note that the object will be modified. |
|
bool |
NeedsLoadForClient() |
Called during saving to determine the load flags to save with the object. |
|
bool |
NeedsLoadForEditorGame() |
Called during saving to include this object in client/servers running in editor builds, even if they wouldn't normally be. |
|
bool |
NeedsLoadForServer() |
Called during saving to determine the load flags to save with the object. |
|
void |
PostEditChangeChainProperty ( |
This alternate version of PostEditChange is called when properties inside structs are modified. |
|
void |
PostEditChangeProperty ( |
Called when a property on this object has been modified externally |
|
void |
PostEditUndo() |
Called after applying a transaction to the object. |
|
void |
PostInitProperties() |
Called after the C++ constructor and after the properties have been initialized, including those loaded from config. |
|
void |
PostLoad() |
Do any object-specific cleanup required immediately after loading an object. |
|
void |
PostRename |
Called at the end of Rename(), but only if the rename was actually carried out |
|
void |
PreEditChange ( |
This is called when a property is about to be modified externally |
|
void |
PreEditUndo() |
Called before applying a transaction to the object. |
|
bool |
Rename ( |
Rename this object to a unique name, or change its outer. |
|
void |
Serialize ( |
Handles reading, writing, and reference collecting using FArchive. |
Name | Description | ||
---|---|---|---|
|
void |
AddAssetUserData ( |
|
|
UAssetUserDa... |
GetAssetUserDataOfClass ( |
|
|
void |
RemoveUserDataOfClass ( |
Name |
Description |
---|---|
FOnMarkRenderStateDirty |
Name |
Description |
---|---|
AllUCSModifiedProperties |
|
AllUCSModifiedPropertiesLock |
|
ComponentTemplateNameSuffix |
Prefix used to identify template component instances |
GlobalCreatePhysicsDelegate |
Create component physics state global delegate. |
GlobalDestroyPhysicsDelegate |
Destroy component physics state global delegate. |
MarkRenderStateDirtyEvent |
Called When render state is marked dirty |
Name | Description | ||
---|---|---|---|
|
uint8: 1 |
bCreatedByConstructionScript_DEPRECATED |
Replaced by CreationMethod |
|
uint8: 1 |
bInstanceComponent_DEPRECATED |
Replaced by CreationMethod |