Python Script Editor User Guide
Features Overview

The Python Script Editor provides a convenient environment for writing and executing Python code in Unreal Engine.
Features:
- Multiple tabs support
- Syntax highlighting
- Line numbers
- Search functionality (plain text and regex)
- Output log with syntax highlighting
Editor Interface

You can add and remove tabs with the +/x buttons on the tab bar, double clicking will rename the tab.
Above the output log is a search bar with optional regex for searching previous outputs.
Keyboard Shortcuts
Ctrl+Enter
: Execute selected text
Ctrl+Tab
: Show the Completer
Ctrl+H
: Print help for selected variable
Ctrl+P
: Pretty print selected variable
Code Execution
The editor supports executing Python code directly within Unreal Engine. You can:
- Execute selected text
- Execute the entire active tab
- See outputs
- Search through execution history
Completer

The Python Script Editor includes a code completion feature accessible via Ctrl+Tab
. The completer popup helps speed up coding by providing contextual suggestions:
- Press
Ctrl+Tab
to open the completer popup
- Type to filter available completions
- Use arrow keys or mouse to select desired option
- Press Enter to apply the selected completion
The completer provides suggestions based on the variables in the current scope.
Code Snippets

The snippets menu provides quick access to commonly used code blocks:
- Access via right-click menu
- Organize snippets by categories
- Quick insertion into editor
- Filter snippets by name

Creating custom snippets:
- Save selections as reusable snippets
- Use %SELECTION% placeholder for dynamic content
- Add custom categories
- Give descriptive names for easy access
Output Log Features

- Syntax highlighted output
- Search functionality (plain text and regex)
- Clear output option
- Copy output to clipboard
Getting Started
- Open the Python Script Editor from Tools -> PYTHON -> Python Script Editor
- Create a new tab using the + button
- Write or paste your Python code
- Use Ctrl+Enter to execute selected code
- View output in the log panel below
Working with Snippets
- Right-click in the editor to access snippets menu
- Select “Create Snippet” to save current selection
- Use %SELECTION% in snippets to include selected text
- Access snippets through right-click menu or shortcut bar
Tips and Best Practices
- Use multiple tabs to organize different scripts
- Save frequently used code as snippets
- Utilize keyboard shortcuts for efficient workflow
- Back up code you want to keep
⚠️ Warning: While the Python Script Editor automatically saves your work periodically, there is a risk of data loss if Unreal Engine crashes unexpectedly. It is strongly recommended to keep important scripts backed up in a separate location (such as a version-controlled repository or local file system) outside of the editor.