ue5-style-guide
ue5-style-guide copied to clipboard
UI / UMG / Slate Naming Conventions and Best Practices
I'm looking for any and all insight on how to manage, name, and really just best practices of all kinds. Literally anything useful with UI / UMG / Slate that is helpful to know and conform to.
Please discuss here, on the Gamemakin Discord at https://discord.gg/Kdq5dth or http://discord.gamemak.in/, or just create pull requests with your contributions. If possible, please include ways you've seen these in practice, pros and cons, possible alternates. Feel free to contact me through other secure means if you would like to talk behind an NDA or encryption.
I've always named my UMG Widgets: WBP_Blueprint Widget Blueprint, I think it makes sense and easy to read and understand what it is.
My way of doing it :
- W_ as a prefix for "base" widget Blueprint
- WU_ for Widget Utility For custom object, like button override or something, i add at the end a name to reflect their nature. So as example, GamepadButton or HealthThrobber.
Inside Widget Editor, all widget variables are prefixed with their nature, to quickly find it in event graph side (Btn_Login, Txt_ItemDescription)
I've tried both WBP and W, but I like W better because it looks a bit better in the palette, which strips _. I've been doing Login_Button instead of Btn_Login for individual widget variables because I want the related widgets to sort together, although I could theoretically use categories for that (which I never do because it's the one thing you have to edit in the variable view)