# Insert Items into an Array In-Game

**URL:** <https://forums.unrealengine.com/t/insert-items-into-an-array-in-game/49250>\
**Category:** Community & Industry Discussion\
**Tags:** unreal-engine\
**Created:** [December 5, 2015, 7:03pm UTC](https://forums.unrealengine.com/t/insert-items-into-an-array-in-game/49250 "2015-12-05T19:03:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_e41e608c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e41e608c](https://forums.unrealengine.com/u/anonymous_user_e41e608c)\
**Post date:** [December 5, 2015, 7:03pm UTC](https://forums.unrealengine.com/t/insert-items-into-an-array-in-game/49250/1 "2015-12-05T19:03:57Z")

</div>

So I setup a TraceLineByChannel for an Actor Class that checks an array to see if the item is in the array, if not, the item is then added to the array. All works well, however, when i close the PIE and check the array in the blueprint the array is empty. How do I permanently add items to an array?

---

<div class="post-metadata">

**Author:** ![HavocX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HavocX](https://forums.unrealengine.com/u/HavocX)\
**Post date:** [December 6, 2015, 6:17pm UTC](https://forums.unrealengine.com/t/insert-items-into-an-array-in-game/49250/2 "2015-12-06T18:17:32Z")

</div>

Nothing is ever saved by itself when ending a game. You need to set up a save and restore.

> **[Saving and Loading Your Game](https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/SaveGame/)**
>
> Overview of how to save and load your game
