GBManipulationCopyUtils
Summary
Section titled “Summary”Utility functions for preparing cloned objects during manipulation operations.
This class provides centralized logic for disabling scripts and processing on duplicated nodes used in preview and manipulation workflows. This ensures that AI scripts, movement logic, and other gameplay code don’t execute on temporary copies being positioned/previewed.
Methods
Section titled “Methods”static func prepare_manipulation_copy( p_target: Node, p_type_exceptions: Array[String] ) -> void
Utility functions for preparing cloned objects during manipulation operations.
This class provides centralized logic for disabling scripts and processing on duplicated nodes used in preview and manipulation workflows. This ensures that AI scripts, movement logic, and other gameplay code don’t execute on temporary copies being positioned/previewed.
Prepares a manipulated copy by disabling scripts and processing. This prevents AI movement, physics updates, and other gameplay logic from executing on the temporary copy during move/build operations.
p_target
: Node - The root node of the copied object to preparep_type_exceptions
: Array[String] - Script class names to preserve (e.g., “Manipulatable”)static func remove_scripts_recursive( p_target: Node, p_type_exceptions: Array[String] ) -> void
Removes scripts from a node and its children recursively. Scripts with global names in the exception list are preserved.
p_target
: Node - The node to processp_type_exceptions
: Array[String] - Script class names to keepstatic func restore_processing( p_target: Node ) -> void
Re-enables processing on a node (typically after canceling a manipulation). This is the inverse of prepare_manipulation_copy’s process mode change.
p_target
: Node - The node to re-enable
Source
Section titled “Source”addons/grid_building/utils/gb_manipulation_copy_utils.gd
This API reference is automatically generated from the plugin source code. For implementation examples and usage guides, see the guides section.