I can't find a way to create an object (UI) when an enemy is spawned and is not already in the array.
The sentence looks a bit crazy to understand so let me explain.
For each enemy of the same instance that is spawned, I would like to have only 1 UI object that is displayed.
Each time there is an enemy spawned, I populate the array with the name of the enemy.
At the moment, each time that an enemy is spawned, I generate 1 UI object for it.
I just want to have 1 UI object of this enemy because I want to have a number that corresponds to the sum of the same enemies on the UI object.
I want to keep an array because I would like to sort the UI.
Thanks for your help!