rename_bp_variable
Rename a Blueprint member variable in place, preserving its VarGuid, type, default value and flags while rewiring every Get/Set node in this and dependent Blueprints.
Instructions
Rename a member variable DECLARED on this Blueprint, KEEPING everything the delete+re-add workaround throws away: the VarGuid, the type, the default value, the category, the tooltip and the replication flags -- and, crucially, RE-WIRING every Get/Set node that reads it, in this Blueprint and in every dependent one. This is the only correct way to rename an authored variable in place (e.g. to translate its name). WARNING: it refuses a variable that has a RepNotify function: the engine's own rename opens a MODAL dialog for that case (FSuppressableWarningDialog, which does NOT honour unattended mode) and would hang the editor waiting for a click -- clear the RepNotify with set_bp_variable_replication, rename, then set it back. WARNING: dependent Blueprints are only repaired if they are LOADED: this command loads the ones the Asset Registry reports as referencers first, and reports them in referencers_loaded, but an asset that references it in a way the registry does not see keeps the old name silently. It does NOT create CoreRedirects, so a saved game, a DataTable cell or a Python set_editor_property that names the variable as text is NOT fixed -- grep for those. Run compile_blueprint afterwards and save_asset on this Blueprint AND on every referencer.
Returns: { blueprint_name, old_name, new_name, renamed (re-read: true only if new_name exists and old_name is gone), referencers_loaded: [string], repnotify_cleared: bool, warning? }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Optional. This command is REFUSED while a Play-in-Editor session is running: it either compiles a Blueprint (the reinstancer can retain a world, and CheckForWorldGCLeaks is Fatal -- it KILLS the editor) or writes to disk (Editor.AllowSavingAssetsDuringPIE=0 makes the engine refuse the write, so it would report success without writing a byte). Stop PIE and retry instead; force=true runs it anyway, at your own risk. | |
| new_name | Yes | New name. Must be a legal identifier and free across the WHOLE class chain (the engine does not check this and would happily create a duplicate). Case-only changes are allowed. | |
| old_name | Yes | Current name of a variable declared on THIS Blueprint; inherited/native ones are refused. | |
| blueprint_name | No | Blueprint asset name or path owning the variable. | |
| blueprint_path | No | Alias of `blueprint_name` (same value, same meaning). Accepted because sibling tools spell this parameter differently; prefer `blueprint_name`. | |
| load_referencers | No | Optional bool (default true). Load the Blueprints the Asset Registry lists as referencers BEFORE renaming, so the engine's reference fixup reaches them; it only ever sees what is already in memory. |