What is this system called? I want to store item, click item to select actor

Hey Auran13 Just wanted to update you and everyone else here @nande @RedGrimnir I managed to solve this without it being too convoluted.

Here’s what I did:

I created a game state which I will store a component I’ve named ‘ActorManager’.

In this component I register, unregister and ‘getRegisteredActor’ in seperate functions. What these basically do is add to a MAP which contains a name and an actor reference.

In my spawning actor I add another component I made called ‘register actor’ which has a custom event that references the actor manager in game state, gets the owner of this component and the unique ID I set in the spawning actor and sends it to ‘Register Actor’ in the AssetManager component.

It also unregisters if the spawning actor is destroyed.

From within the ActorManager upon registering I get my UI widget with ‘get all widgets of class’ and fire an event through its reference return. This event has an input for the unique ID which I link from this component through to my widget.

There in the widget I ‘getRegisteredActor’ from the game state > ActorManager component and then feed the info into the listview directly:

And it works so well:

I can also now directly control my listed items, so I can delete ones I don’t want anymore and soon other things.

2 Likes