# do sets loose their order

**URL:** <https://forums.unrealengine.com/t/do-sets-loose-their-order/2438933>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question\
**Created:** [April 4, 2025, 7:43am UTC](https://forums.unrealengine.com/t/do-sets-loose-their-order/2438933 "2025-04-04T07:43:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![barbrian0723](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@barbrian0723](https://forums.unrealengine.com/u/barbrian0723)\
**Post date:** [April 4, 2025, 7:43am UTC](https://forums.unrealengine.com/t/do-sets-loose-their-order/2438933/1 "2025-04-04T07:43:53Z")

</div>

hi

do sets loose or retain their order

will the order of the set be the order that items are added to the set or not?

thanks

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [April 4, 2025, 8:30am UTC](https://forums.unrealengine.com/t/do-sets-loose-their-order/2438933/2 "2025-04-04T08:30:21Z")

</div>

There’s nothing to lose as they have no guaranteed order. If you add 1,2,3,4, that’s what you have, sure. But if you keep manipulating it, remove, re-add elements, there will be no order.

---

<div class="post-metadata">

**Author:** ![barbrian0723](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@barbrian0723](https://forums.unrealengine.com/u/barbrian0723)\
**Post date:** [April 4, 2025, 8:32am UTC](https://forums.unrealengine.com/t/do-sets-loose-their-order/2438933/3 "2025-04-04T08:32:17Z")

</div>

thanks

i need to maintain order so i switch back from set to array although set is slightly easier to use

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [May 4, 2025, 8:33am UTC](https://forums.unrealengine.com/t/do-sets-loose-their-order/2438933/4 "2025-05-04T08:33:02Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
