Coding conventions for Unreal Engine 4 for C++, Blueprint and Python

Project Setup
Assets
Blueprint
C++
Python

View the Project on GitHub JonasReich/OpenUnrealConventions

Home / Python

Python Coding Conventions

Our rules for Python code in Unreal Engine are fairly straight-forward: Stick to PEP 8 and you’re good.

Depending on how much Python code you write and how runtime-critical it is you may want to extend those rules for certain projects, but even then I would discourage coming up with your own rules and instead use the Google Python Style Guide instead. It’s more verbose than PEP 8 and contains more guidelines on how to write and document code.

I don’t want to copy-paste big parts of either those conventions here and reccommend you pick either one of them and stick with it. Nevertheless, here is a bullet point list of a few rules that are often ignored by newcomers to Python, especially in an Unreal context where they are sometimes at odds with the C++ style guide.