# Questions about bool variable

**URL:** <https://forums.unrealengine.com/t/questions-about-bool-variable/46777>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [November 6, 2015, 3:22am UTC](https://forums.unrealengine.com/t/questions-about-bool-variable/46777 "2015-11-06T03:22:05Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Jambax](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jambax/32/904177_2.png) [@Jambax](https://forums.unrealengine.com/u/Jambax)\
**Post date:** [November 9, 2015, 12:45pm UTC](https://forums.unrealengine.com/t/questions-about-bool-variable/46777/4 "2015-11-09T12:45:46Z")

</div>

AFAIK it’s just bit-packing. All you’re doing is packing multiple booleans into a single variable. It can in some cases help with Replication for multiplayer, but it’s only really useful for that. There isn’t any real performance benefit to be gained from doing so in the real world.

It’s also worth noting that when you declare these bools, they all have to be sequentially declared in the header file. For example, these two will be packed:

```auto

uint8 MyBool : 1;
uint8 MyBool2 : 1;

```

whereas these will not, and will actually create new uint8’s for each:

```auto

uint8 MyBool : 1;
float MyFloat;
uint8 MyBool2 : 1;

```

EDIT: Also the reason you’re only getting UE4 results when you google it is because uint32 is a UE4 type.

---

_[View the full topic](https://forums.unrealengine.com/t/questions-about-bool-variable/46777)._
