Parent

Category: Executor Tier: Basic

Purpose

Manages real-time scene tree manipulation.

Visual Reference

As added to your scene
Parent brick as it appears in the GDLink editor

Runtime Behavior

Inputs

  • Activate (Boolean): Triggers the specified structural change.

Properties

  • Action (Enum, “Set Child”):

  • Set Child: Makes the target object a child of the current node.

  • Remove Child: Orphans the target object from its current parent.

  • Clear Children: Removes and cleans up all children from the current node.

  • Instantiate: Spawns a new scene as a child.

  • Target Node (NodePath): The object to be reparented or managed.

  • Keep Transform (Boolean, true): If true, uses native reparent logic to maintain the object’s visual position.

  • Destruction Mode (Enum, “Deferred”):

  • Deferred: Uses queue_free for safe deletion.

  • Immediate: Uses native cleanup for performance-critical pools.

P3 Enhancements & Safety

  • Safe Reparenting: Automatically handles Top Level flags and transform preservation to prevent “teleporting” children.

  • Instantiation Metadata: Automatically attaches a unique UID to new instances, allowing Interaction Listeners to track them immediately.

  • Ladybug Debug: Logs the successful reparenting or destruction event: [Hierarchy] Set Child | Target: Sword_01 -> Player_Hand.

Generated UI Mockup — showing expanded properties
Parent
-
x
Name:
Label this brick...
Action:
v
Set Child:
v
Remove Child:
v
Clear Children:
v
Instantiate:
v
Target Node:
v
Keep Transform:
v
Destruction Mode:
v
Deferred:
v
Immediate:
v

Properties

This brick does not expose a generated property table yet. See the source specification for implementation notes.