API ReferenceGE Extensionsflowgraphnodesscene
Remove Prefab (Flowgraph Node)
- **Node Name:** `Remove Prefab`
Overview
- Node Name:
Remove Prefab - Category:
repeat_instant - File:
extensions/flowgraph/nodes/scene/removePrefab.lua
Removes a prefab from the scene by ID.
Pin Schema
Input Pins
| Pin | Type | Description |
|---|---|---|
flow | flow | Inflow for this node |
id | number | Prefab ID to remove (default 0) |
Behavior
work()- Callsself.mgr.modules.prefab:deletePrefab(id, true)to delete the prefab.- The second argument (
true) forces immediate deletion.
- The second argument (
How It Works
- Each time flow is received, the node tells the flowgraph's prefab module to delete the specified prefab.
- The prefab module handles cleanup of the scene tree object and any associated resources.
Key Dependencies
self.mgr.modules.prefab:deletePrefab(id, force)- removes a tracked prefab from the scene
Additional Methods
C:_executionStopped()
Called when graph execution stops. Used for cleanup.
See Also
- Collection Marker (Flowgraph Node) - Related reference
- Custom Lua Command (Flowgraph Node) - Related reference
- Get Object Field (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide