I can’t understand why use it.
what is difference between List and List?
I can’t understand why use it.
what is difference between List and List?
Arrays, Lists, Dictionaries. They can be confusing at first.
An array is normally a fixed length collection of data of the same type. You access its items using an index. Pacman had four enemies (no more and no less) so their GameObjects could easily be stored in an array.
A List is an extensible collection of typed data. Unlike Arrays, you can add items at any position and remove them (making the List smaller). In a game where you were instantiating enemies and recording them, a List is much better than an Array because the number of enemies goes up and down. A List of enemies might contain Name, Health, Damage, abilities etc. All of this would be in a single item for each enemy. You access an Item in a List the same ways as Arrays - through its index.
If you have a fixed amount of data, an Array is slightly faster than a List but a List is more flexible. I would normally use a List over an array.
While you access Arrays and Lists by index (i.e. by number), there will be occasions when you want to access a collection by a key (give me information about the enemy called “The Joker”).
Dictionaries are similar to Lists (an extensible collection of typed data) but, when you store data, you specify the Key (“The Joker”) and the Value(s). These are called Key-Value Pairs. You can still loop through a Dictionary but it’s much slower than iterating through an Array or a List
Unity Learn on Lists and Dictionaries
Perhaps you might rewrite your question if this is not what you were after.