Instanced Clones

Say I have a prefab with a text component. I could instantiate that object and then get its text component and change the text as necessary.

However, what would I have to do if I wanted to have something instantiated x amount and and reference those copies individually?

For example, I have one card that spawned and its text should be 15 and another one spawns and its text should be 30. How would I assign that without getting each one and doing it manually? Could I preset that from the editor somehow?

I suppose if you have a component on there that is has a static variable that is incremented each time the “Start” or “Awake” method is called, you could have the clones do it as they are instantiated, however, I’m not sure why you would do that vs having the script that does the instantiation do it instead. But yes, it’s possible.

Instantiate the prefab, get the component and set the text.