Hello!
I have a prefab in Resources folder. This prefab has script which has the following line in script:
var AllItems: Transform[];
In Hierarchy I have objects, like Item1, Item2, Item3… Now i have to manually drag the objects in to this prefabs script.
But I need some kind of script to do this automaticaly for example at the Start() when the prefab is instantiated The script searches for i dont know - a word “Item” or what to add all objects with this name to the Transform array. How to script this ?
Thanks!