hey guys, i have a bunch of prefabs of (for this example, lets say) weapons.
so…
WeaponName
-> gameobject with mesh
-> whatever else is childed to it (attached scopes, etc!)
and all these prefabs are tagged with ‘weapon’.
is there a way to iterate through all objects with that tag and add them to a list? so that i can instantiate them later?
i know i can do this through the editor, by making a public List and putting all my weapon prefabs into that list by hang, but i want to do it through code so that i can just add weapons as i please and the game will just pick it up and add it to the list rather than me having to do it each time