Best Way To Use "Find"

Hi:

I was just wondering which way is more efficient to find gameobject1 with a gameobject2 that gets instantiated during game play?

Example: GameObject2 script

    GameObject gameObject1;
	Enemy enemy;

	void Start()
	{
		foreach (GameObject enemyGroup in GameObject.FindGameObjectsWithTag("Enemy"))
		{
			if(enemyGroup.name == "Enemy Object")
			{
				gameObject1 = enemyGroup;

				if(gameObject1)
				{
					enemy = gameObject1.GetComponent<Enemy>();
				}
			}
		}
	}

or just use:

    GameObject gameObject1;
	Enemy enemy;

	void Start()
	{
		gameObject1 = GameObject.Find ("Enemy Object");
		enemy = gameObject1.GetComponent<Enemy>();
	}

Or is there a better way to use “Find” during run time?

Thank You: James

Find with tag is more efficient according to this:
http://answers.unity3d.com/questions/15451/which-is-faster-gameobjectfind-or-gameobjectfindwi.html

Like yuso said though, the for loopwith FindWithTag will keep going through your loop until the end so you may want to add a break after you find what you are looking for so it will stop.

Just as a side note with how you have it setup you don’t need to store gameObject1 as part of the class, can just have it be temporary in the function.