G1R AngelScript
Scripting reference for the Gothic 1 Remake
Loading...
Searching...
No Matches
UActorComponent Class Reference

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

Public Member Functions

Functions
void Tick (float32 DeltaSeconds)
 Event called every frame if tick is enabled.
EComponentCreationMethod GetComponentCreationMethod () const
void SetbIsEditorOnly (bool Value)
void EndPlay (EEndPlayReason EndPlayReason)
 Blueprint implementable event for when the component ends play, generally via destruction or its Actor's EndPlay.
void BeginPlay ()
 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 MarkRenderStateDirty ()
bool HasBegunPlay () const
void SetbTickInEditor (bool Value)
bool IsVisualizationComponent () const
void SetIsVisualizationComponent (bool Value)
void AsyncPhysicsTick (float32 DeltaSeconds, float32 SimSeconds)
 Event called every async physics tick if bAsyncPhysicsTickEnabled is true.
bool GetbReplicateUsingRegisteredSubObjectList () const
 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.
void SetbReplicateUsingRegisteredSubObjectList (bool Value)
 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.
bool GetbReplicates () const
 Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!
void SetbReplicates (bool Value)
 Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!
bool GetbAutoActivate () const
 Whether the component is activated at creation or must be explicitly activated.
void SetbAutoActivate (bool Value)
 Whether the component is activated at creation or must be explicitly activated.
void SetbEditableWhenInherited (bool Value)
 True if this component can be modified when it was inherited from a parent actor class.
void SetbCanEverAffectNavigation (bool Value)
 Whether this component can potentially influence navigation.
bool GetbIsEditorOnly () const
 If true, the component will be excluded from non-editor builds.
Public Member Functions inherited from UObject
bool MarkPackageDirty () const
void RemoveFromRoot ()
bool GetIsRooted () const
bool IsTransient () const
bool Modify (bool bAlwaysMarkDirty=true)
void SetTransactional (bool bTransactional)
bool IsSupportedForNetworking () const
UClass GetClass () const
UObject GetOuter () const
UObject GetTypedOuter (TSubclassOf< UObject > Target) const
 Traverses the outer chain searching for the next object of a certain type.
UPackage GetOutermost () const
UPackage GetPackage () const
void AddToRoot ()
UWorld GetWorld () const
FName GetName () const
FString GetFullName (const UObject StopOuter=nullptr) const
FString GetPathName (const UObject StopOuter=nullptr) const
bool IsA (const UClass Class) const
 Returns true if this object is of the specified type, or a child of that type.
void SaveConfig ()
void LoadConfig ()
void ReloadConfig ()
void CopyScriptPropertiesFrom (const UObject OtherObject)
void opCast (?&Address) const
FString ToString () const

Static Public Member Functions

Static Functions
static UActorComponent Get (const AActor Actor, FName WithName=NAME_None)
static UActorComponent GetOrCreate (AActor Actor, FName WithName=NAME_None)
static UActorComponent Create (AActor Actor, FName WithName=NAME_None)
static UClass StaticClass ()
Static Public Member Functions inherited from UObject
static UClass StaticClass ()

Public Attributes

Activation
bool bAutoActivate
 Whether the component is activated at creation or must be explicitly activated.
AssetUserData
TArray< TObjectPtr< UAssetUserData > > AssetUserData
 Array of user data stored with the component.
TArray< TObjectPtr< UAssetUserData > > AssetUserDataEditorOnly
 Array of user data stored with the component.
ComponentReplication
bool bReplicates
 Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!
ComponentTick
FActorComponentTickFunction PrimaryComponentTick
 Main tick function for the Component.
Cooking
bool bIsEditorOnly
 If true, the component will be excluded from non-editor builds.
Replication
bool 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.
Tags
TArray< FName > ComponentTags
 Array of tags that can be used for grouping and categorizing. Can also be accessed from scripting.
Variables
const EComponentCreationMethod ComponentCreationMethod
Public Attributes inherited from UObject
const UClass Class
const UObject Outer
const UPackage Outermost
const UPackage Package
const UWorld World
const FName Name
const bool IsRooted

Components

const AActor Owner
 Follow the Outer chain to get the AActor that 'Owns' this component.
bool IsBeingDestroyed () const
 Returns whether the component is in the process of being destroyed.
void SetIsReplicated (bool ShouldReplicate)
 Enable or disable replication. This is the equivalent of RemoteRole for actors (only a bool is required for components).
void DestroyComponent (UObject Object)
 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.
bool ComponentHasTag (FName Tag) const
 See if this component contains the supplied tag.
AActor GetOwner () const
 Follow the Outer chain to get the AActor that 'Owns' this component.

Components|Activation

FActorComponentDeactivateSignature OnComponentDeactivated
 Called when the component has been deactivated.
FActorComponentActivatedSignature OnComponentActivated
 Called when the component has been activated, with parameter indicating if it was from a reset.
void SetAutoActivate (bool bNewAutoActivate)
 Sets whether the component should be auto activate or not. Only safe during construction scripts.
bool IsActive () const
 Returns whether the component is active or not.
void ToggleActive ()
 Toggles the active state of the component.
void SetActive (bool bNewActive, bool bReset=false)
 Sets whether the component is active or not.
void Activate (bool bReset=false)
 Activates the SceneComponent, should be overridden by native child classes.
void Deactivate ()
 Deactivates the SceneComponent.

Components|Tick

float32 ComponentTickInterval
 Returns the tick interval for this component's primary tick function, which is the frequency in seconds at which it will be executed.
float32 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.
void AddTickPrerequisiteActor (AActor PrerequisiteActor)
 Make this component tick after PrerequisiteActor.
void AddTickPrerequisiteComponent (UActorComponent PrerequisiteComponent)
 Make this component tick after PrerequisiteComponent.
void RemoveTickPrerequisiteComponent (UActorComponent PrerequisiteComponent)
 Remove tick dependency on PrerequisiteComponent.
void SetTickableWhenPaused (bool bTickableWhenPaused)
 Sets whether this component can tick when paused.
bool IsComponentTickEnabled () const
 Returns whether this component has tick enabled or not.
void SetTickGroup (ETickingGroup NewTickGroup)
 Changes the ticking group for this component.
void RemoveTickPrerequisiteActor (AActor PrerequisiteActor)
 Remove tick dependency on PrerequisiteActor.
void SetComponentTickIntervalAndCooldown (float32 TickInterval)
 Sets the tick interval for this component's primary tick function. Does not enable the tick interval. Takes effect imediately.
void SetComponentTickInterval (float32 TickInterval)
 Sets the tick interval for this component's primary tick function. Does not enable the tick interval. Takes effect on next tick.
void SetComponentTickEnabled (bool bEnabled)
 Set this component's tick functions to be enabled or disabled. Only has an effect if the function is registered.

Detailed Description

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.

@see ActorComponent @see USceneComponent @see UPrimitiveComponent

Member Function Documentation

◆ Activate()

void Activate ( bool bReset = false)

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

Parameters
bResetWhether the activation should happen even if ShouldActivate returns false.

◆ AddTickPrerequisiteActor()

void AddTickPrerequisiteActor ( AActor PrerequisiteActor)

Make this component tick after PrerequisiteActor.

◆ AddTickPrerequisiteComponent()

void AddTickPrerequisiteComponent ( UActorComponent PrerequisiteComponent)

Make this component tick after PrerequisiteComponent.

◆ AsyncPhysicsTick()

void AsyncPhysicsTick ( float32 DeltaSeconds,
float32 SimSeconds )

Event called every async physics tick if bAsyncPhysicsTickEnabled is true.

◆ BeginPlay()

void BeginPlay ( )

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.

◆ ComponentHasTag()

bool ComponentHasTag ( FName Tag) const

See if this component contains the supplied tag.

◆ Create()

UActorComponent Create ( AActor Actor,
FName WithName = NAME_None )
static

◆ Deactivate()

void Deactivate ( )

Deactivates the SceneComponent.

◆ DestroyComponent()

void DestroyComponent ( UObject Object)

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.

◆ EndPlay()

void EndPlay ( EEndPlayReason EndPlayReason)

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

◆ Get()

UActorComponent Get ( const AActor Actor,
FName WithName = NAME_None )
static

◆ GetbAutoActivate()

bool GetbAutoActivate ( ) const

Whether the component is activated at creation or must be explicitly activated.

◆ GetbIsEditorOnly()

bool GetbIsEditorOnly ( ) const

If true, the component will be excluded from non-editor builds.

◆ GetbReplicates()

bool GetbReplicates ( ) const

Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!

◆ GetbReplicateUsingRegisteredSubObjectList()

bool GetbReplicateUsingRegisteredSubObjectList ( ) const

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.

◆ GetComponentCreationMethod()

EComponentCreationMethod GetComponentCreationMethod ( ) const

◆ GetComponentTickInterval()

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

◆ GetOrCreate()

UActorComponent GetOrCreate ( AActor Actor,
FName WithName = NAME_None )
static

◆ GetOwner()

AActor GetOwner ( ) const

Follow the Outer chain to get the AActor that 'Owns' this component.

◆ HasBegunPlay()

bool HasBegunPlay ( ) const

◆ IsActive()

bool IsActive ( ) const

Returns whether the component is active or not.

Returns
The active state of the component.

◆ IsBeingDestroyed()

bool IsBeingDestroyed ( ) const

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

◆ IsComponentTickEnabled()

bool IsComponentTickEnabled ( ) const

Returns whether this component has tick enabled or not.

◆ IsVisualizationComponent()

bool IsVisualizationComponent ( ) const

◆ MarkRenderStateDirty()

void MarkRenderStateDirty ( )

◆ RemoveTickPrerequisiteActor()

void RemoveTickPrerequisiteActor ( AActor PrerequisiteActor)

Remove tick dependency on PrerequisiteActor.

◆ RemoveTickPrerequisiteComponent()

void RemoveTickPrerequisiteComponent ( UActorComponent PrerequisiteComponent)

Remove tick dependency on PrerequisiteComponent.

◆ SetActive()

void SetActive ( bool bNewActive,
bool bReset = false )

Sets whether the component is active or not.

Parameters
bNewActiveThe new active state of the component
bResetWhether the activation should happen even if ShouldActivate returns false.

◆ SetAutoActivate()

void SetAutoActivate ( bool bNewAutoActivate)

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

Parameters
bNewAutoActivateThe new auto activate state of the component

◆ SetbAutoActivate()

void SetbAutoActivate ( bool Value)

Whether the component is activated at creation or must be explicitly activated.

◆ SetbCanEverAffectNavigation()

void SetbCanEverAffectNavigation ( bool Value)

Whether this component can potentially influence navigation.

◆ SetbEditableWhenInherited()

void SetbEditableWhenInherited ( bool Value)

True if this component can be modified when it was inherited from a parent actor class.

◆ SetbIsEditorOnly()

void SetbIsEditorOnly ( bool Value)

◆ SetbReplicates()

void SetbReplicates ( bool Value)

Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!

◆ SetbReplicateUsingRegisteredSubObjectList()

void SetbReplicateUsingRegisteredSubObjectList ( bool Value)

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.

◆ SetbTickInEditor()

void SetbTickInEditor ( bool Value)

◆ SetComponentTickEnabled()

void SetComponentTickEnabled ( bool bEnabled)

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

Parameters
bEnabledWhether it should be enabled or not

◆ SetComponentTickInterval()

void SetComponentTickInterval ( float32 TickInterval)

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

Parameters
TickIntervalThe duration between ticks for this component's primary tick function

◆ SetComponentTickIntervalAndCooldown()

void SetComponentTickIntervalAndCooldown ( float32 TickInterval)

Sets the tick interval for this component's primary tick function. Does not enable the tick interval. Takes effect imediately.

Parameters
TickIntervalThe duration between ticks for this component's primary tick function

◆ SetIsReplicated()

void SetIsReplicated ( bool ShouldReplicate)

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

◆ SetIsVisualizationComponent()

void SetIsVisualizationComponent ( bool Value)

◆ SetTickableWhenPaused()

void SetTickableWhenPaused ( bool bTickableWhenPaused)

Sets whether this component can tick when paused.

◆ SetTickGroup()

void SetTickGroup ( ETickingGroup NewTickGroup)

Changes the ticking group for this component.

◆ StaticClass()

UClass StaticClass ( )
static

◆ Tick()

void Tick ( float32 DeltaSeconds)

Event called every frame if tick is enabled.

◆ ToggleActive()

void ToggleActive ( )

Toggles the active state of the component.

Member Data Documentation

◆ AssetUserData

TArray<TObjectPtr<UAssetUserData> > AssetUserData

Array of user data stored with the component.

◆ AssetUserDataEditorOnly

TArray<TObjectPtr<UAssetUserData> > AssetUserDataEditorOnly

Array of user data stored with the component.

◆ bAutoActivate

bool bAutoActivate

Whether the component is activated at creation or must be explicitly activated.

◆ bIsEditorOnly

bool bIsEditorOnly

If true, the component will be excluded from non-editor builds.

◆ bReplicates

bool bReplicates

Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!

◆ bReplicateUsingRegisteredSubObjectList

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

◆ ComponentCreationMethod

const EComponentCreationMethod ComponentCreationMethod

◆ ComponentTags

TArray<FName> ComponentTags

Array of tags that can be used for grouping and categorizing. Can also be accessed from scripting.

◆ ComponentTickInterval

float32 ComponentTickInterval

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

◆ OnComponentActivated

FActorComponentActivatedSignature OnComponentActivated

Called when the component has been activated, with parameter indicating if it was from a reset.

◆ OnComponentDeactivated

FActorComponentDeactivateSignature OnComponentDeactivated

Called when the component has been deactivated.

◆ Owner

const AActor Owner

Follow the Outer chain to get the AActor that 'Owns' this component.

◆ PrimaryComponentTick

FActorComponentTickFunction PrimaryComponentTick

Main tick function for the Component.