# Naming Events, Variables, and functions

**URL:** <https://forums.unrealengine.com/t/naming-events-variables-and-functions/2566944>\
**Category:** Blueprint\
**Tags:** unreal-engine, Blueprint, question\
**Created:** [June 19, 2025, 11:58pm UTC](https://forums.unrealengine.com/t/naming-events-variables-and-functions/2566944 "2025-06-19T23:58:14Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![WiseManDark](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WiseManDark](https://forums.unrealengine.com/u/WiseManDark)\
**Post date:** [June 19, 2025, 11:58pm UTC](https://forums.unrealengine.com/t/naming-events-variables-and-functions/2566944/1 "2025-06-19T23:58:14Z")

</div>

Been wondering I know in code c++ we name things using no spaces all in one word:  
Ex: int hungerBar = 100;  
But in blueprints naming is it alright to just name everything with underscores?  
EX: Hunger\_Bar = 100;

---

<div class="post-metadata">

**Author:** ![SupportiveEntity](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SupportiveEntity](https://forums.unrealengine.com/u/SupportiveEntity)\
**Post date:** [June 20, 2025, 6:18am UTC](https://forums.unrealengine.com/t/naming-events-variables-and-functions/2566944/2 "2025-06-20T06:18:37Z")

</div>

Hey there @WiseManDark! So “best practices” is one of those things that is a bit different for everyone. It won’t break anything to use the underscores in BP variable names, but considering in blueprints you can use spaces for variable names many users do. I generally maintain the same convention without space or underscores personally, but having the spaces helps readability when working with lots of blueprint variables.

---

<div class="post-metadata">

**Author:** ![BoomFishBlocky](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/boomfishblocky/32/1139120_2.png) [@BoomFishBlocky](https://forums.unrealengine.com/u/BoomFishBlocky)\
**Post date:** [August 29, 2026, 2:17pm UTC](https://forums.unrealengine.com/t/naming-events-variables-and-functions/2566944/3 "2026-08-29T14:17:28Z")

</div>

Are there downsides since it’s allowed? Cuz if it’s allowed and has no major downsides, I might just keep naming things with spaces for BP.

---

<div class="post-metadata">

**Author:** ![Auran131](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Auran131](https://forums.unrealengine.com/u/Auran131)\
**Post date:** [August 29, 2026, 3:40pm UTC](https://forums.unrealengine.com/t/naming-events-variables-and-functions/2566944/4 "2026-08-29T15:40:23Z")

</div>

probably not in BP but i would say there is no advantage either. I think PascalCase is clear enough

---

<div class="post-metadata">

**Author:** ![MagForceSeven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/magforceseven/32/906563_2.png) [@MagForceSeven](https://forums.unrealengine.com/u/MagForceSeven)\
**Post date:** [August 30, 2026, 3:05pm UTC](https://forums.unrealengine.com/t/naming-events-variables-and-functions/2566944/5 "2026-08-30T15:05:18Z")

</div>

Blueprint can really exacerbate naming issues because of how it inserts spaces or replaces ‘\_’ with them.

Here’s two variables declared in C++:  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/5/a/15ae4ae5acb2a1495b73ad103aac1ef43e985b9d.png)

And this is how they show up in the Blueprint’s variable list:  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/5/1/7518e5738db9e9c8919b9ec4f508e387ff5b0afa.png)

The show the exact name in the details panel though:  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/b/f/7bf6f7d2f4dd89cd8a1b3073ec03a4fbc8da6db3.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/0/b/a0b87cfffae228c16409a9bf83f6b50da33920f6.png)

And now I can actually add a variable from blueprint with an _actual_ space in the name!  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/2/6/526987b3b29bdd155c7619f2b3de64358d8e6b93.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/2/9/829f40768176718cead4a53f71f1363e7bbb56e1.png)

And if I make a variable without a space from blueprint, the display name _isn’t_ changed the same way variables from C++ are!  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/6/5/c6510a77a8b17f8bcbdb61031ddd2fd1b7147901.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/a/2/8a2d7bdf37ec539c83c8ba4584c0532268726084.png)

> [@BoomFishBlocky](#):
>
> Are there downsides since it’s allowed?

The only real downside is that because spaces aren’t allowed in C++ names, it’s easy/possible to duplicate a variable name from C++ by including a space and Blueprint will happily let you do that. If you always do PascalCase, Blueprint will be able to prevent you from creating a blueprint variable with the same name as C++ because they _will_ be the same.

---

<div class="post-metadata">

**Author:** ![BoomFishBlocky](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/boomfishblocky/32/1139120_2.png) [@BoomFishBlocky](https://forums.unrealengine.com/u/BoomFishBlocky)\
**Post date:** [September 16, 2026, 6:46am UTC](https://forums.unrealengine.com/t/naming-events-variables-and-functions/2566944/6 "2026-09-16T06:46:29Z")

</div>

When will this be useful though, and is it worth it for me to redo most of my existing vars for bp to remove the spaces?

---

<div class="post-metadata">

**Author:** ![Auran131](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Auran131](https://forums.unrealengine.com/u/Auran131)\
**Post date:** [September 16, 2026, 6:54am UTC](https://forums.unrealengine.com/t/naming-events-variables-and-functions/2566944/7 "2026-09-16T06:54:48Z")

</div>

i wouldnt go back and change everything, it risks breaking too much in BP but start building better habits for your next project

---

<div class="post-metadata">

**Author:** ![MagForceSeven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/magforceseven/32/906563_2.png) [@MagForceSeven](https://forums.unrealengine.com/u/MagForceSeven)\
**Post date:** [September 16, 2026, 12:05pm UTC](https://forums.unrealengine.com/t/naming-events-variables-and-functions/2566944/8 "2026-09-16T12:05:32Z")

</div>

I’d agree with @Auran131, it’s not worth going back and changing anything that you already have. Just to change how you’re building things in the future. This is often why you see “bad” code in projects. Something was learned that was “better” but it wasn’t retroactively applied to existing code because it wasn’t worth the time or effort or consequences to change.
