reload_script
Reload a Python controller file to apply on-disk edits. Recompiles linked Action Graph ScriptNodes, or re-executes standalone scripts for iteration.
Instructions
Reload a Python controller from a file on disk.
Two modes, chosen automatically:
If any Action-Graph ScriptNode references this file (inputs:scriptPath), those ScriptNodes are force-recompiled so your on-disk edits take effect on the running graph. This is how you iterate on a ScriptNode controller.
Otherwise the file is (re-)executed as a standalone controller, the way you would use execute_script for code longer than ~20 lines.
Workflow:
Write the controller as a .py file (attach via create_action_graph script_file=... for ScriptNode use)
reload_script to load / recompile it
step_simulation to debug (frozen timeline) or play for a ScriptNode demo
Edit the file and reload_script again to iterate
The file's directory is auto-added to sys.path.
Args: file_path: Path to the Python file on disk. script_file: Alias for file_path. create_action_graph names this argument script_file, and an unknown argument is dropped silently rather than rejected, so both spellings are accepted here instead of one of them quietly doing nothing. module_name: Optional module name to reload (e.g. 'my_controller').
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | No | ||
| module_name | No | ||
| script_file | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |