unreal.PCGComponent
¶
- class unreal.PCGComponent(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
ActorComponent
C++ Source:
Plugin: PCG
Module: PCG
File: PCGComponent.h
Editor Properties: (see get_editor_property/set_editor_property)
activated
(bool): [Read-Write]asset_user_data
(Array[AssetUserData]): [Read-Write] Array of user data stored with the componentasset_user_data_editor_only
(Array[AssetUserData]): [Read-Write] Array of user data stored with the componentauto_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 navigationcomponent_tags
(Array[Name]): [Read-Write] Array of tags that can be used for grouping and categorizing. Can also be accessed from scripting.current_editing_mode
(PCGEditorDirtyMode): [Read-Write] Current editing mode that depends on the serialized editing mode and loading. If the component is set to GenerateAtRuntime, this will behave as Preview.dirty_generated
(bool): [Read-Only]editable_when_inherited
(bool): [Read-Write] True if this component can be modified when it was inherited from a parent actor classgenerate_on_drop_when_trigger_on_demand
(bool): [Read-Write] When Generation Trigger is OnDemand, we can still force the component to generate on drop.generated
(bool): [Read-Only] Flag to indicate whether this component has run in the editor. Note that for partitionable actors, this will always be false.generated_graph_output
(PCGDataCollection): [Read-Only]generation_grid_size
(uint32): [Read-Only]generation_in_progress
(bool): [Read-Only]generation_radii
(PCGRuntimeGenerationRadii): [Read-Write]generation_trigger
(PCGComponentGenerationTrigger): [Read-Write]graph_instance
(PCGGraphInstance): [Read-Only]input_type
(PCGComponentInput): [Read-Write]is_component_local
(bool): [Read-Only]is_component_partitioned
(bool): [Read-Write] Will partition the component in a grid, dispatching the generation to multiple local components. Grid size is determined by the PCGWorldActor unless the graph has Hierarchical Generation enabled, in which case grid sizes are determined by the graph.is_editor_only
(bool): [Read-Write] If true, the component will be excluded from non-editor buildslast_generated_bounds
(Box): [Read-Only]on_component_activated
(ActorComponentActivatedSignature): [Read-Write] Called when the component has been activated, with parameter indicating if it was from a reseton_component_deactivated
(ActorComponentDeactivateSignature): [Read-Write] Called when the component has been deactivatedon_pcg_graph_cancelled_external
(OnPCGGraphCancelledExternal): [Read-Write] Event dispatched when a graph cancels generation on this component.on_pcg_graph_cleaned_external
(OnPCGGraphCleanedExternal): [Read-Write] Event dispatched when a graph cleans on this component.on_pcg_graph_generated_external
(OnPCGGraphGeneratedExternal): [Read-Write] Event dispatched when a graph completes its generation on this component.on_pcg_graph_start_generating_external
(OnPCGGraphStartGeneratingExternal): [Read-Write] Event dispatched when a graph begins generation on this component.only_track_itself
(bool): [Read-Write] Even if the graph has external dependencies, the component won’t react to them.override_generation_radii
(bool): [Read-Write] Manual overrides for the graph generation radii and cleanup radius multiplier.parse_actor_components
(bool): [Read-Write]per_pin_generated_output
(Map[str, PCGDataCollection]): [Read-Only] If any graph edges cross execution grid sizes, data on the edge is stored / retrieved from this map.post_generate_function_names
(Array[Name]): [Read-Write] Can specify a list of functions from the owner of this component to be called when generation is done, in order.Need to take (and only take) a PCGDataCollection as parameter and with “CallInEditor” flag enabled.
primary_component_tick
(ActorComponentTickFunction): [Read-Write] Main tick function for the Componentregenerate_in_editor
(bool): [Read-Write]replicate_using_registered_sub_object_list
(bool): [Read-Write] 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.replicates
(bool): [Read-Write] Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!scheduling_policy
(PCGSchedulingPolicyBase): [Read-Only] This is the instanced UPCGSchedulingPolicy object which holds scheduling parameters and calculates priorities.scheduling_policy_class
(type(Class)): [Read-Write] A Scheduling Policy dictates the order in which instances of this component will be scheduled.seed
(int32): [Read-Write]serialized_editing_mode
(PCGEditorDirtyMode): [Read-Only]
- add_to_managed_resources(resource) None ¶
Registers some managed resource to the current component
- Parameters:
resource (PCGManagedResource) –
- cleanup_local(remove_components, save=False) None ¶
Cleans up the generation from a local (vs. remote) standpoint. Will not be replicated. Will be delayed.
- clear_pcg_link(template_actor=None) Actor ¶
Move all generated resources under a new actor, following a template (AActor if not provided), clearing all link to this PCG component. Returns the new actor.
- generate(force) None ¶
Networked generation call that also activates the component as needed
- Parameters:
force (bool) –
- generate_local(force) None ¶
Starts generation from a local (vs. remote) standpoint. Will not be replicated. Will be delayed.
- Parameters:
force (bool) –
- property generate_on_drop_when_trigger_on_demand: bool¶
[Read-Only] When Generation Trigger is OnDemand, we can still force the component to generate on drop.
- Type:
(bool)
- property generated: bool¶
[Read-Only] Flag to indicate whether this component has run in the editor. Note that for partitionable actors, this will always be false.
- Type:
(bool)
- property generation_radii: PCGRuntimeGenerationRadii¶
[Read-Write]
- Type:
- property generation_trigger: PCGComponentGenerationTrigger¶
[Read-Only]
- Type:
- get_editing_mode() PCGEditorDirtyMode ¶
Returns the current editing mode
- Return type:
- get_generated_graph_output() PCGDataCollection ¶
Retrieves generated data
- Return type:
- get_serialized_editing_mode() PCGEditorDirtyMode ¶
Get Serialized Editing Mode
- Return type:
- property graph_instance: PCGGraphInstance¶
[Read-Only]
- Type:
- property input_type: PCGComponentInput¶
[Read-Write]
- Type:
- property is_component_partitioned: bool¶
[Read-Write] Will partition the component in a grid, dispatching the generation to multiple local components. Grid size is determined by the PCGWorldActor unless the graph has Hierarchical Generation enabled, in which case grid sizes are determined by the graph.
- Type:
(bool)
- notify_properties_changed_from_blueprint() None ¶
Notify properties changed, used in runtime cases, will dirty & trigger a regeneration if needed
- property on_pcg_graph_cancelled_external: OnPCGGraphCancelledExternal¶
[Read-Write] Event dispatched when a graph cancels generation on this component.
- Type:
- property on_pcg_graph_cleaned_external: OnPCGGraphCleanedExternal¶
[Read-Write] Event dispatched when a graph cleans on this component.
- Type:
- property on_pcg_graph_generated_external: OnPCGGraphGeneratedExternal¶
[Read-Write] Event dispatched when a graph completes its generation on this component.
- Type:
- property on_pcg_graph_start_generating_external: OnPCGGraphStartGeneratingExternal¶
[Read-Write] Event dispatched when a graph begins generation on this component.
- property only_track_itself: bool¶
[Read-Write] Even if the graph has external dependencies, the component won’t react to them.
- Type:
(bool)
- property override_generation_radii: bool¶
[Read-Write] Manual overrides for the graph generation radii and cleanup radius multiplier.
- Type:
(bool)
- property post_generate_function_names: None¶
[Read-Write] Can specify a list of functions from the owner of this component to be called when generation is done, in order. Need to take (and only take) a PCGDataCollection as parameter and with “CallInEditor” flag enabled.
- property scheduling_policy: PCGSchedulingPolicyBase¶
[Read-Only] This is the instanced UPCGSchedulingPolicy object which holds scheduling parameters and calculates priorities.
- Type:
- property scheduling_policy_class: Class¶
[Read-Only] A Scheduling Policy dictates the order in which instances of this component will be scheduled.
- set_editing_mode(editing_mode, serialized_editing_mode) None ¶
Set Editing Mode
- Parameters:
editing_mode (PCGEditorDirtyMode) –
serialized_editing_mode (PCGEditorDirtyMode) –
- set_graph(graph) None ¶
Set Graph
- Parameters:
graph (PCGGraphInterface) –