I'm creating a custom editor window where I want to list all Objects in the current scene that has a WayPoint script attached to them. I need all Objects in this list to have unique names because I later want to use GameObject.Find(object.name) to make a reference to each GameObject.
Here is my code:
void Example() {
// Find all objects with Waypoint script
Object[] objectArray = Resources.FindObjectsOfTypeAll(typeof(WayPoint));
// A list with all duplicate names
List
↧