unreal.InstancedActorsSubsystem
¶
- class unreal.InstancedActorsSubsystem(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
TickableWorldSubsystem
Instanced Actor subsystem used to spawn AInstancedActorsManager’s and populate their instance data. It also keeps track of all InstancedActorDatas and can be queried for them see: AInstancedActorsManager
C++ Source:
Plugin: InstancedActors
Module: InstancedActors
File: InstancedActorsSubsystem.h
- instance_actor(actor_class, instance_transform, level, instance_tags, manager_class) InstancedActorsInstanceHandle ¶
Adds an instance of ActorClass at InstanceTransform location by spawning or reusing a AInstancedActorsManager at InstanceTransform’s grid cell location. see: UInstancedActorsProjectSettings::GridSize
- Parameters:
- Return type:
- remove_actor_instance(instance_handle, destroy_manager_if_empty=True) bool ¶
Removes all instance data for InstanceHandle.
This simply adds this instance to a FreeList which incurs extra cost to process at runtime before instance spawning. see: IA.CompactInstances console command
- Parameters:
instance_handle (InstancedActorsInstanceHandle) – Instance to remove
destroy_manager_if_empty (bool) – If true, and InstanceHandle is the last instance in its manager, destroy the now-empty manager. This implicitly clears the FreeList which is stored per-manager. Any subsequent instance adds will then create a fresh manager.
- Return type: