unreal.ActorComponent?

class unreal.ActorComponent(outer=None, name='None')?

Bases: unreal.Object

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. [ActorComponent](http://www.daysmarketla.com/latest/INT/Programming/UnrealArchitecture/Actors/Components/index.html#actorcomponents): USceneComponent: UPrimitiveComponent:

C++ Source:

  • Module: Engine
  • File: ActorComponent.h

Editor Properties: (see get_editor_property/set_editor_property)

  • asset_user_data (Array(AssetUserData)): [Read-Write] Array of user data stored with the component
  • auto_activate (bool): [Read-Write] Whether the component is activated at creation or must be explicitly activated.
  • can_ever_affect_navigation (bool): [Read-Write] Whether this component can potentially influence navigation
  • component_tags (Array(Name)): [Read-Write] Array of tags that can be used for grouping and categorizing. Can also be accessed from scripting.
  • editable_when_inherited (bool): [Read-Write] True if this component can be modified when it was inherited from a parent actor class
  • is_editor_only (bool): [Read-Write] If true, the component will be excluded from non-editor builds
  • on_component_activated (ActorComponentActivatedSignature): [Read-Write] Called when the component has been activated, with parameter indicating if it was from a reset
  • on_component_deactivated (ActorComponentDeactivateSignature): [Read-Write] Called when the component has been deactivated
  • primary_component_tick (ActorComponentTickFunction): [Read-Write] Main tick function for the Component
  • replicates (bool): [Read-Write] Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!
activate(reset=False) → None?

Activates the SceneComponent, should be overridden by native child classes.

Parameters:reset (bool) – Whether the activation should happen even if ShouldActivate returns false.
add_tick_prerequisite_actor(prerequisite_actor) → None?

Make this component tick after PrerequisiteActor

Parameters:prerequisite_actor (Actor) –
add_tick_prerequisite_component(prerequisite_component) → None?

Make this component tick after PrerequisiteComponent.

Parameters:prerequisite_component (ActorComponent) –
auto_activate?

(bool) – [Read-Only] Whether the component is activated at creation or must be explicitly activated.

component_has_tag(tag) → bool?

See if this component contains the supplied tag

Parameters:tag (Name) –
Returns:
Return type:bool
component_tags?

(Array(Name)) – [Read-Write] Array of tags that can be used for grouping and categorizing. Can also be accessed from scripting.

deactivate() → None?

Deactivates the SceneComponent.

destroy_component(object) → None?

Unregister and mark for pending kill a component. This may not be used to destroy a component that is owned by an actor unless the owning actor is calling the function.

Parameters:object (Object) –
get_component_tick_interval() → float?

Returns the tick interval for this component’s primary tick function, which is the frequency in seconds at which it will be executed

Returns:
Return type:float
get_owner() → Actor?

Follow the Outer chain to get the AActor that ‘Owns’ this component

Returns:
Return type:Actor
is_active() → bool?

Returns whether the component is active or not

Returns:The active state of the component.
Return type:bool
is_being_destroyed() → bool?

Returns whether the component is in the process of being destroyed.

Returns:
Return type:bool
is_component_tick_enabled() → bool?

Returns whether this component has tick enabled or not

Returns:
Return type:bool
is_editor_only?

(bool) – [Read-Only] If true, the component will be excluded from non-editor builds

on_component_activated?

(ActorComponentActivatedSignature) – [Read-Write] Called when the component has been activated, with parameter indicating if it was from a reset

on_component_deactivated?

(ActorComponentDeactivateSignature) – [Read-Write] Called when the component has been deactivated

receive_begin_play() → None?

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.

receive_end_play(end_play_reason) → None?

Blueprint implementable event for when the component ends play, generally via destruction or its Actor’s EndPlay.

Parameters:end_play_reason (EndPlayReason) –
receive_initialize_component()?

deprecated: ‘receive_initialize_component’ was renamed to ‘receive_begin_play’.

receive_tick(delta_seconds) → None?

Event called every frame if tick is enabled

Parameters:delta_seconds (float) –
receive_uninitialize_component(end_play_reason)?

deprecated: ‘receive_uninitialize_component’ was renamed to ‘receive_end_play’.

remove_tick_prerequisite_actor(prerequisite_actor) → None?

Remove tick dependency on PrerequisiteActor.

Parameters:prerequisite_actor (Actor) –
remove_tick_prerequisite_component(prerequisite_component) → None?

Remove tick dependency on PrerequisiteComponent.

Parameters:prerequisite_component (ActorComponent) –
replicates?

(bool) – [Read-Only] Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!

set_active(new_active, reset=False) → None?

Sets whether the component is active or not

Parameters:
  • new_active (bool) – The new active state of the component
  • reset (bool) – Whether the activation should happen even if ShouldActivate returns false.
set_auto_activate(new_auto_activate) → None?

Sets whether the component should be auto activate or not. Only safe during construction scripts.

Parameters:new_auto_activate (bool) – The new auto activate state of the component
set_component_tick_enabled(enabled) → None?

Set this component’s tick functions to be enabled or disabled. Only has an effect if the function is registered

Parameters:enabled (bool) – Whether it should be enabled or not
set_component_tick_interval(tick_interval) → None?

Sets the tick interval for this component’s primary tick function. Does not enable the tick interval. Takes effect on next tick.

Parameters:tick_interval (float) – The duration between ticks for this component’s primary tick function
set_is_replicated(should_replicate) → None?

Enable or disable replication. This is the equivalent of RemoteRole for actors (only a bool is required for components)

Parameters:should_replicate (bool) –
set_tick_group(new_tick_group) → None?

Changes the ticking group for this component

Parameters:new_tick_group (TickingGroup) –
set_tickable_when_paused(tickable_when_paused) → None?

Sets whether this component can tick when paused.

Parameters:tickable_when_paused (bool) –
toggle_active() → None?

Toggles the active state of the component