# Sharing array between classes

**URL:** <https://forums.unrealengine.com/t/sharing-array-between-classes/1155863>\
**Category:** Programming & Scripting\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [May 5, 2023, 9:09pm UTC](https://forums.unrealengine.com/t/sharing-array-between-classes/1155863 "2023-05-05T21:09:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![theb4ku](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@theb4ku](https://forums.unrealengine.com/u/theb4ku)\
**Post date:** [May 5, 2023, 9:09pm UTC](https://forums.unrealengine.com/t/sharing-array-between-classes/1155863/1 "2023-05-05T21:09:39Z")

</div>

I have such a problem that I need to provide continuously updated data of actors for the second class. This data updates when the button in the parent class is clicked, only nowhere can I find if there is a way to keep a “live” reference to this array. Unless there is another way to get around this?

---

<div class="post-metadata">

**Author:** ![CosmicDanAU](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/cosmicdanau/32/642728_2.png) [@CosmicDanAU](https://forums.unrealengine.com/u/CosmicDanAU)\
**Post date:** [May 6, 2023, 2:16am UTC](https://forums.unrealengine.com/t/sharing-array-between-classes/1155863/2 "2023-05-06T02:16:18Z")

</div>

Difficult to understand the exact issue without code, but my guess is that you’re not updating the array with the `<transacts>` effect. If so, make sure that whenever you update the array, you do so within a scope that has that effect. E.g. a setter method.

If you’ve not used transactions before, see my reply here: [When to use \<transacts\> specifier?](https://forums.unrealengine.com/t/when-to-use-transacts-specifier/1155825)

Also, possibly related: [Comunication between Scripts, possible bug](https://forums.unrealengine.com/t/comunication-between-scripts-possible-bug/1123847)
