PinWright
← All areas

Python scripting

Editor & system
2 operationspython

Run Python in the editor for anything no other area covers.

What it’s for

This area runs Python inside Unreal’s built-in interpreter and gives your assistant the result. It is useful when a job needs Unreal’s Python API directly.

Most work has dedicated support elsewhere: placing actors, editing Blueprints, checking widgets, dumping assets. That support gives clearer results and errors. Python is for the jobs nothing else covers, such as a rarely used editor function, or a change across hundreds of objects at once.

So your assistant uses it sparingly. It checks for a dedicated route first, because that route is safer and easier to review. Python is the last resort and a quick way to prototype.

Two things to know. A long script freezes the editor until it finishes. And a script can fail even when it starts fine, so your assistant checks the script’s own output and log before telling you it worked.

Things you can ask

Run a Python script file

Your script runs in the editor and you hear what it did.

examplepython
You: Run my batch-rename tool script against the project.

Ran batch_rename.py. It renamed 47 assets.

Get a quick answer from Python

A one-line Python expression answers a question about your project.

examplepython
You: How many assets are under /Game/MyGame?

There are 312 assets under /Game/MyGame.

Keep values between steps

A value set in one step is still there in the next.

examplepython
You: Stash a base counter, then give me double it.

I stored MY_VAR = 42 and read it back in the next step. Doubled, it is 84.