How can I find GameObjects with a keyword in Unity ?
Actually, I have a lot of GameObject named like that :
- Concrete Floor [289483]
- Concrete Floor [289487]
- Wall part [293291]
- Part [321043]
- ...
I already made functions to get the ID of an object (inside the [] brackets) because it is the relevant part of the GameObject name.
ID should be unique, but I'm not sure it is !
Now, I would like to have a function with this prototype :
public static GameObject[] getObjectsWithIdentifier(int identifier)
It would return all of the objects that have the identifier given in parameter. So it's like a search function.
GameObject.Find(name)
, as I understand it, only make the search for the exact name of the object.
Thanks for your help !