Navigation
API > API/Plugins > API/Plugins/InstancedActors
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UActorComponent
- UInstancedActorsComponent
References
| Module | InstancedActors |
| Header | /Engine/Plugins/Runtime/InstancedActors/Source/InstancedActors/Public/InstancedActorsComponent.h |
| Include | #include "InstancedActorsComponent.h" |
Syntax
UCLASS (ClassGroup="Instanced Actors", Meta=(BlueprintSpawnableComponent))
class UInstancedActorsComponent : public UActorComponent
Remarks
Provides Mass Entity reference and interop functions for Actors spawned via Instanced Actors on both client & server.
Variables
| Type | Name | Description | |
|---|---|---|---|
| FInstancedActorsInstanceHandle | InstanceHandle | Handle to the instance that spawned this Instanced Actor, if this component's Actor owner was spawned by the Instanced Actor system, invalid handle otherwise. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | If HasMassEntity(), adds a new default constructed FragmentType to this Instanced Actor's Mass entity, if not already present (no-op otherwise) Performed deferred using FMassCommandBuffer to safely add fragments, as Mass may currently be performing parallel processing. | ||
| void | AddOrUpdateFragmentsDeferred
(
FragmentTypes&&... NewFragments |
If HasMassEntity(), adds or updates existing FragmentTypes for this Instanced Actor's Mass entity. | |
| void | AddOrUpdatePersistentFragmentsDeferred
(
FragmentTypes&&... NewFragments |
If HasMassEntity(), adds or updates existing FragmentTypes for this Instanced Actor's Mass entity, then requests a persistent data resave once the fragments are updated. | |
| uint32 | Subclasses implementing SerializeInstancePersistenceData must implement this method and return a non-zero unique uint32 used to match serialized persistence records with this UInstancedActorsComponent's SerializeInstancePersistenceData implementation. | ||
| FMassEntityHandle | Handle to this Instanced Actor's Mass Entity, if this components Actor owner was spawned by the Instanced Actor system, invalid handle otherwise. | ||
| TSharedPtr< FMassEntityManager > | If HasMassEntity(), the Mass Entity Manager for MassEntityHandle | ||
| FMassEntityManager & | |||
| const FragmentType * | If HasMassEntity(), returns existing FragmentType fragment for this Instanced Actor's Mass Entity, if any. | ||
| bool | Returns true if this Actor was spawned by the Instanced Actor system for a Mass Entity. | ||
| void | InitializeComponentForInstance
(
FInstancedActorsInstanceHandle InInstanceHandle |
Called on servers during InitializeComponent for Actors spawned by the Instanced Actor system. | |
| void | ModifyMassEntityConfig
(
FMassEntityManager& InMassEntityManager, |
Called on an 'exemplar' Actor's components for clients & servers during UInstancedActorsData::CreateEntityTemplate to provide UInstancedActorsComponent's an opportunity to extend Mass entity default traits. | |
| void | ModifyMassEntityTemplate
(
FMassEntityManager& InMassEntityManager, |
Called on ActorClass CDO components for clients & servers during UInstancedActorsData::CreateEntityTemplate to provide UInstancedActorsComponent's an opportunity to extend Mass entity default fragments. | |
| void | |||
| void | OnServerPreSpawnInitForInstance
(
FInstancedActorsInstanceHandle InInstanceHandle |
Called on servers before InitializeComponent & BeginPlay in UServerInstancedActorsSpawnerSubsystem::SpawnActor for Actors spawned by the Instanced Actor system. | |
| void | If HasMassEntity(), removes FragmentType from this Instanced Actor's Mass entity, if present (no-op otherwise) Performed deferred using FMassCommandBuffer to safely add fragments, as Mass may currently be performing parallel processing. | ||
| void | SerializeInstancePersistenceData
(
FStructuredArchive::FRecord Record, |
Called by AInstancedActorsManager::SerializeInstancePersistenceData for IAD's with an ActorClass containing this UInstancedActorsComponent, to save / load extended persistence data. | |
| bool | ShouldSerializeInstancePersistenceData
(
const FArchive& Archive, |
Called prior to SerializeInstancePersistenceData for both saving & loading persistence data, to check if we indeed have persistence data to write / want to read. |
Overridden from UActorComponent
| Type | Name | Description | |
|---|---|---|---|
| void | EndPlay
(
const EEndPlayReason::Type EndPlayReason |
Ends gameplay for this component. | |
| void | Initializes the component. |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | GetLifetimeReplicatedProps
(
TArray< FLifetimeProperty >& OutLifetimeProps |
Returns properties that are replicated for the lifetime of the actor channel |