Allar / ue5-style-guide

An attempt to make Unreal Engine 4 projects more consistent
http://ue5.style
MIT License
5.27k stars 1.14k forks source link

UI / UMG / Slate Naming Conventions and Best Practices #67

Open Allar opened 3 years ago

Allar commented 3 years ago

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.

huklen commented 3 years ago

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.

lucastucious commented 3 years ago

My way of doing it :

Inside Widget Editor, all widget variables are prefixed with their nature, to quickly find it in event graph side (Btn_Login, Txt_ItemDescription)

doublebuffered commented 3 years ago

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)