# List of Actors (Pawn) in a Widget

**URL:** <https://forums.unrealengine.com/t/list-of-actors-pawn-in-a-widget/582337>\
**Category:** Blueprint\
**Tags:** Blueprints-Programming, unreal-engine\
**Created:** [June 15, 2022, 7:41am UTC](https://forums.unrealengine.com/t/list-of-actors-pawn-in-a-widget/582337 "2022-06-15T07:41:30Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phylogenius](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Phylogenius](https://forums.unrealengine.com/u/Phylogenius)\
**Post date:** [June 15, 2022, 7:41am UTC](https://forums.unrealengine.com/t/list-of-actors-pawn-in-a-widget/582337/1 "2022-06-15T07:41:30Z")

</div>

Hi there ,  
In a “Widget” I would like to put a list of “Pawn” present in the game Is the “List View” a good way to do it?

Thank you for your help

---

<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:** [June 15, 2022, 9:20am UTC](https://forums.unrealengine.com/t/list-of-actors-pawn-in-a-widget/582337/2 "2022-06-15T09:20:28Z")

</div>

> [@Phylogenius](#):
>
> “List View” a good way to do it?

The `List View` is great if you have _a lot_ of widgets - hundreds, thousands or more, and you do not want to pay the cost of having all of them loaded all the time. The `List View` is also better at re-ordering stuff - is it important here?

* * *

If you’re working with a list of Pawns that will have just a handful of elements, or the entire content of the list is always displayed anyway, the `List View` may be an overkill.

A Vertical / Horizontal Box would suffice. A Wrap Box may also be a good choice.

---

<div class="post-metadata">

**Author:** ![Phylogenius](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Phylogenius](https://forums.unrealengine.com/u/Phylogenius)\
**Post date:** [June 15, 2022, 10:34am UTC](https://forums.unrealengine.com/t/list-of-actors-pawn-in-a-widget/582337/3 "2022-06-15T10:34:05Z")

</div>

Hello and thank you for your answer.

It is a simulation of an ant’s nest, the number of individuals is increasing and can reach several thousand. The lioste would allow me to take knowledge of the variables contained in the Bleuprint Pawn, if I am not mistaken.

---

<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:** [June 15, 2022, 10:43am UTC](https://forums.unrealengine.com/t/list-of-actors-pawn-in-a-widget/582337/4 "2022-06-15T10:43:19Z")

</div>

> [@Phylogenius](#):
>
> the number of individuals is increasing and can reach several thousand

You’d be scrolling through the list and viewing only some of the _several thousand_ of them, right? The `List View` it is then, for sure.

---

<div class="post-metadata">

**Author:** ![Phylogenius](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Phylogenius](https://forums.unrealengine.com/u/Phylogenius)\
**Post date:** [June 15, 2022, 10:49am UTC](https://forums.unrealengine.com/t/list-of-actors-pawn-in-a-widget/582337/5 "2022-06-15T10:49:59Z")

</div>

> [@Everynone](#):
>
> You’d be scrolling through the list and viewing only some of the _several thousand_ of them, right? The `List View` it is then, for sure.

Yes indeed only some.  
Do you have a tutorial showing how to do it all?

---

<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:** [June 15, 2022, 10:52am UTC](https://forums.unrealengine.com/t/list-of-actors-pawn-in-a-widget/582337/6 "2022-06-15T10:52:57Z")

</div>

For a fully fledged tut, you’d be better off searching on YT; for a quick-start overview, you can check this out:

> [@Creating a combat log in Blueprint](https://forums.unrealengine.com/t/creating-a-combat-log-in-blueprint/150005/10):
>
> No problem, if you want to experiment with the List View instead: create an Object class blueprint in the content browser with an exposed text variable - it will be used to store data in the list view, called Entry Data below. once you have it, you can do this in the wLogLine’s class settings: The Implemented Interfaces bit on the left is the critical part here! It allows you to pull the data from a list view object and assign it to the widget’s variable. Th…

---

<div class="post-metadata">

**Author:** ![Phylogenius](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Phylogenius](https://forums.unrealengine.com/u/Phylogenius)\
**Post date:** [June 15, 2022, 6:49pm UTC](https://forums.unrealengine.com/t/list-of-actors-pawn-in-a-widget/582337/7 "2022-06-15T18:49:44Z")

</div>

Thanks for your help; I will do with what you give me and what I will find next.  
I might come back to bother you 😉

---

<div class="post-metadata">

**Author:** ![Phylogenius](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Phylogenius](https://forums.unrealengine.com/u/Phylogenius)\
**Post date:** [June 30, 2022, 12:20pm UTC](https://forums.unrealengine.com/t/list-of-actors-pawn-in-a-widget/582337/8 "2022-06-30T12:20:20Z")

</div>

Hello Everynone;  
I’m coming back to you after a few inconclusive attempts. I followed the explanation you gave, plus others, but my limited knowledge does not allow me to achieve what I want.  
How to connect the list and the different instances of the pawn, so that they are available each time the list is called.

In fact what I’m looking for is a list of variables contained in instances of a BP Pawn. In order to visualize the creation of a worker (creation of the instance) in a colony (of ants), and to be able to follow its evolution until its end (deletion of the instance).

I think I need to make a backup of the list and the instances associated with it, but I couldn’t find how to do it…

I rely on your kindness and your knowledge

The start of operations

 ![List](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/9/3/e934e5e5c162b18f6421a46f2023a975c7d03bfb.png)  
 ![My Pawn](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/8/c/b8c76526379db58c82f88613036af36358568ed7.png)  
 ![Widget](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/f/8/1f8ae477de9ab69798bfa558cb97746126557821.png)

---

<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:** [July 6, 2022, 8:07am UTC](https://forums.unrealengine.com/t/list-of-actors-pawn-in-a-widget/582337/9 "2022-07-06T08:07:40Z")

</div>

> [@Phylogenius](#):
>
> In fact what I’m looking for is a list of variables contained in instances of a BP Pawn. In order to visualize the creation of a worker (creation of the instance) in a colony (of ants), and to be able to follow its evolution until its end (deletion of the instance).

Hey, I’m having trouble visualising an overview of what’s needed:

- there’s a colony of (how many, roughly?) ants
- _each_ (pawn?) ant tracks and stores its own evolution progress (what data are we storing)
- we want to visualise this data in through widgets
- are we looking at one ant at a time or the colony as a whole?

---

<div class="post-metadata">

**Author:** ![Phylogenius](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Phylogenius](https://forums.unrealengine.com/u/Phylogenius)\
**Post date:** [July 6, 2022, 8:20am UTC](https://forums.unrealengine.com/t/list-of-actors-pawn-in-a-widget/582337/10 "2022-07-06T08:20:25Z")

</div>

> [@Everynone](#):
>
> Hey, I’m having trouble visualising an overview of what’s needed:
> 
> - there’s a colony of (how many, roughly?) ants
> - _each_ (pawn?) ant tracks and stores its own evolution progress (what data are we storing)
> - we want to visualise this data in through widgets
> - are we looking at one ant at a time or the colony as a whole?

Hello and thank you for stopping by.

The colony starts with a queen who lays and grows over time without having a pre-defined limit.

The data is that contained in a “pawn”, which represents all ants as a whole, all castes combined. That of the nest (a colony that can contain several nests)

The widgets show us a colony in its entirety, but I don’t want to have the “pawn” moving on the screen, it will only be represented on the ListView (at first… )

Thanks in advance for your answer

---

<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:** [July 6, 2022, 8:39am UTC](https://forums.unrealengine.com/t/list-of-actors-pawn-in-a-widget/582337/11 "2022-07-06T08:39:57Z")

</div>

> [@Phylogenius](#):
>
> Thanks in advance for your answer

Don’t really know how to answer, though. How are you storing the data, what data? Assuming you’re storing it all in a struct array (for saving purposes), what is stopping you from adding the content of the array to the list view?

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/7/e/77e942a39e82b9ed77fcfc5ba7adc0f90603cd89.jpeg)

What’s not working about the above? Are you having issues with saving (because the above does not save anything) or displaying it.

---

<div class="post-metadata">

**Author:** ![Phylogenius](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Phylogenius](https://forums.unrealengine.com/u/Phylogenius)\
**Post date:** [July 6, 2022, 10:37am UTC](https://forums.unrealengine.com/t/list-of-actors-pawn-in-a-widget/582337/12 "2022-07-06T10:37:53Z")

</div>

> [@Everynone](#):
>
> Don’t really know how to answer, though. How are you storing the data, what data? Assuming you’re storing it all in a struct array (for saving purposes), what is stopping you from adding the content of the array to the list view?

Could a structure be related to variable data and indexed to the instance of the pawn?  
Because each “ant” must have a different age from that of the others, since they are not all born at the same time.  
the list must include the data contained in each ant and display the update of the variables during the games

Yes, I indeed have a saving and loading problem, how to make the list resume each time the previous entries and add new ones and save them.

---

<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:** [July 6, 2022, 11:00am UTC](https://forums.unrealengine.com/t/list-of-actors-pawn-in-a-widget/582337/13 "2022-07-06T11:00:39Z")

</div>

> [@Phylogenius](#):
>
> Could a structure be related to variable data and indexed to the instance of the pawn?

Each ant needs its own set of data, it could be simple struct:

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/4/1/9410cc91ce8f39821bb72e5fea8fbc136f265ad9.png)

The Pawn can hold an array of those structs - that’s your colony.

In your save game object, create the same array for saving purposes:

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/4/e/04e22b4a82cd625f62ff020ba82ab04cb60e9927.png)

As the colony develops and we get more ants, the Pawn adds and keeps them in an array. When it’s time to save the game, we save that struct in the game object.

* * *

Technically, you could use the List View as _storage_ but it seems quite unnatural.

* * *

When it comes to loading, saving and updating save games, this explains it better than I ever could:

[Saving and Loading Your Game | Unreal Engine 4.27 Documentation](https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/SaveGame/#:~:text=Unreal%20Engine%204%20(UE4)%20features,preserve%20across%20multiple%20play%20sessions).

---

<div class="post-metadata">

**Author:** ![Phylogenius](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Phylogenius](https://forums.unrealengine.com/u/Phylogenius)\
**Post date:** [July 6, 2022, 1:19pm UTC](https://forums.unrealengine.com/t/list-of-actors-pawn-in-a-widget/582337/14 "2022-07-06T13:19:44Z")

</div>

> [@Everynone](#):
>
> As the colony develops and we get more ants, the Pawn adds and keeps them in an array. When it’s time to save the game, we save that struct in the game object.

I can’t match structure, pawn and list. In the list the structure which is in reference in the pawn is eject

---

<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:** [July 6, 2022, 1:26pm UTC](https://forums.unrealengine.com/t/list-of-actors-pawn-in-a-widget/582337/15 "2022-07-06T13:26:06Z")

</div>

> [@Phylogenius](#):
>
> I can’t match structure, pawn and list. In the list the structure which is in reference in the pawn is eject

I am really sorry but I don’t know what that means.

---

<div class="post-metadata">

**Author:** ![Phylogenius](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Phylogenius](https://forums.unrealengine.com/u/Phylogenius)\
**Post date:** [July 6, 2022, 3:17pm UTC](https://forums.unrealengine.com/t/list-of-actors-pawn-in-a-widget/582337/16 "2022-07-06T15:17:00Z")

</div>

> [@Phylogenius](#):
>
> I can’t match structure, pawn and list. In the list the structure which is in reference in the pawn is eject

The better would surely be a pretty drawing with windows and everything, because there I’m broke I don’t know how to explain what I don’t understand…  
Could you make me a “bleuprint” with explanations to place the different things in their place, please?  
sorry im a newbie 😉

---

<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:** [July 6, 2022, 3:25pm UTC](https://forums.unrealengine.com/t/list-of-actors-pawn-in-a-widget/582337/17 "2022-07-06T15:25:46Z")

</div>

> [@Phylogenius](#):
>
> Could you make me a “bleuprint” with explanations to place the different things in their place, please?

Sadly, I do not really fully understand what is required.

* * *

> newbie

Consider breaking it down into smaller pieces first to get the basics right:

- make sure you can use save games correctly - load, save, update
- make sure you understand how structs work and how to update them
- learn about arrays and looping
- make sure you can display a struct in a widget
- make sure you can propagate struct updates to widgets
- make sure you can display an array of structs in widgets
- only then start working with List View

* * *

Lets say I spend the next 2 hours making something for you, you’ll be stuck on the next thing you need to do anyway 😑

---

<div class="post-metadata">

**Author:** ![Phylogenius](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Phylogenius](https://forums.unrealengine.com/u/Phylogenius)\
**Post date:** [July 6, 2022, 4:52pm UTC](https://forums.unrealengine.com/t/list-of-actors-pawn-in-a-widget/582337/18 "2022-07-06T16:52:40Z")

</div>

> [@Everynone](#):
>
> Consider breaking it down into smaller pieces first to get the basics right:
> 
> - make sure you can use save games correctly - load, save, update
> - make sure you understand how structs work and how to update them
> - learn about arrays and looping
> - make sure you can display a struct in a widget
> - make sure you can propagate struct updates to widgets
> - make sure you can display an array of structs in widgets
> - only then start working with List View
> 
> * * *
> 
> Lets say I spend the next 2 hours making something for you, you’ll be stuck on the next thing you need to do anyway

Thanks 🙂

---

<div class="post-metadata">

**Author:** ![Phylogenius](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Phylogenius](https://forums.unrealengine.com/u/Phylogenius)\
**Post date:** [July 21, 2022, 1:33pm UTC](https://forums.unrealengine.com/t/list-of-actors-pawn-in-a-widget/582337/19 "2022-07-21T13:33:40Z")

</div>

Hello Everynone, all,

I followed your advice, I reviewed my knowledge about “Backup” (remaining gaps…, see below=\>). I have more knowledge of Tableau, although…. I have doubts on how to use certain things like Add (Copy /Ref). I acquired the basics that I lacked about “Structure”. I found a tutorial on the View list and managed to link a Structure to it, Display the List on the screen and work on it (change values and copy the list in order to display it afterwards.

 ![Widget List](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/a/b/2ab028190394d495ec07b1c19cee5da5954bca22.png)  
 ![Structure](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/b/4/ab48a377cf2bbed05a51ee60cd5beec7d78a3955.png)  
The structure is placed in an “Object blueprint”  
 ![ObjectDataStructure](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/7/e/f7e54ee35f0e45284a8179f8fab8fd672e8c68ec.png)  
 ![Add Object List](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/c/3/fc340cbc52c2183a5cc66caff0e16ecc53b55b10.png)  
 ![Add Object ti List](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/6/d/86d062edb9c95f366c40845e3b5297f0e5f8efe9.png)  
 ![EventGraph 1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/f/d/bfd2f620fc2896ecc6c373c572bd09b34443d134.png)  
 ![Event Graph 2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/1/2/f12ac774ceca05ecbfa4ee63087903b330afdfa7.png)  
 ![sauvegarde](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/b/c/0bcb997909e35a240974213dfab0198fb7f5b690.png)  
 ![Save Structure](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/5/4/05432106728114a0312cd49f2cabcba4db4bd184.png)  
 ![SaveObject](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/9/b/f9b153c0fe635abd28f15eef7432563a62fc2193.png)

The Problem still remains on the backup of the data of the list and that of the structure. My List saves well in the location reserved for it, but it comes out empty, just the Indexes are present.

 ![Capture d’écran (46)](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/f/e/5fedbebac98cd7fe5af7686c5f32223c018a50d6.png)  
 ![Capture d’écran (45)](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/3/e/23ea304301846d2245d005e536d28e115f620d3d.png)

I hope you can tell me about the rest, I’m out of search on the web, fault of my mother tongue (french) Because traductor.
