find all objects with a particular name that have been scaled

I am quite new to c#

Some of my objects have been scaled up in Y to get some variation. I am wanting to find all of these models and put them in a list so I can easily select them and go right to them.

So assuming the name of the model has the word “Tree” in it. How can I go about selecting all of them that have had their scales adjusted?

I believe this is going to be a pretty simple script, but finding the correct syntax for this has been driving me up the wall.

You want to attach the tree class to all the the trees in the scene. Then place the treemanager into an object anywhere. The tree will register itself with the manager class and the manager class will sort out the tree that are scaled and if you so choose how much they have been scaled

public class Tree (){

	public bool hasBeenScaled;
	public float scaleAmount;
	private TreeManager tManager;

	void Awake (){
		/* there are much better ways of having the treemanager class reference found
		but this will be fine */

		tManager = GameObject.FindObjectWithType<TreeManager> ();
		RegisterCurrentTree ();
	}

	void RegisterCurrentTree (){
		tManager.RegisterTree(this);
	}
}

public class TreeManager (){
	// you need to use System.Collections.Generic to use lists and dictionaries
	public List <Tree> allTrees = new List<Tree>();

	public void RegisterTree (Tree _tree){
		if(!allTrees.contains(_tree)){
			allTrees.add(_tree);
		}
	}

	public List<Tree> FindAllScaledTrees (){
		List<Tree> scaledTrees = new List<Tree>();
		foreach(Tree t in allTrees){
			if(t.hasBeenScaled){
				scaledTrees.add(t);
			}
		}
		return scaledTrees;
	}

	public List<Tree> FindAllScaledTrees (float minScale, float maxScale){
		List<Tree> chosenScaledTrees = new List<Tree>();
		foreach(Tree t in allTrees){
			if(t.hasBeenScaled){
				if(t.scaleAmount >= minScale && t.scaleAmount <= maxScale){
					chosenScaledTrees.add(t);
				}
			}
		}
		return chosenScaledTrees;
	}
}