GBManipulationCopyUtils
AUTO-GENERATED FILE – DO NOT EDIT MANUALLY
Source File: addons/grid_building/utils/gb_manipulation_copy_utils.gd
Extends: RefCounted
Public Methods
prepare_manipulation_copy
Flags: static
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 prepare
p_type_exceptions: Array[String] - Script class names to preserve (e.g., “Manipulatable”)
remove_scripts_recursive
Flags: static
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 process
p_type_exceptions: Array[String] - Script class names to keep
restore_processing
Flags: static
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