API ReferenceGE Extensionsflowgraphnodesscene
Track Prefab (Flowgraph Node)
- **Node Name:** `Track Prefab`
Overview
- Node Name:
Track Prefab - Category:
once_instant - File:
extensions/flowgraph/nodes/scene/trackPrefab.lua
Allows the flowgraph to track a prefab that was spawned outside of the flowgraph system. Provides options to control cleanup behavior when the flowgraph stops.
Pin Schema
Input Pins
| Pin | Type | Description |
|---|---|---|
flow | flow | Standard inflow |
id | number | Prefab ID to track (default 0) |
dontDelete | bool | (Hidden) If true, prefab won't be deleted on stop (default true) |
skipNavgraphReload | bool | (Hidden) If true, skip navgraph reload on stop (default true) |
skipCollisionReload | bool | (Hidden) If true, skip collision reload on stop (default true) |
Behavior
workOnce()- Registers the prefab with the flowgraph's prefab module viamgr.modules.prefab:addPrefab(), passing cleanup options.
How It Works
- Fires once when triggered.
- Adds the externally-spawned prefab to the flowgraph's prefab tracking system.
- The cleanup options (
dontDelete,skipNavgraphReload,skipCollisionReload) control what happens when the flowgraph execution ends:- By default, all three are
true, meaning the prefab is preserved and no expensive reloads occur. - Set
dontDeletetofalseto have the flowgraph clean up the prefab on stop.
- By default, all three are
Key Dependencies
self.mgr.modules.prefab:addPrefab(id, options)- registers a prefab for flowgraph lifecycle management
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