Instanciate with parameter

I have a bullet prefab which I instantiate whenever the gun fires. The Bullet-Prefab has a script, which moves the bullet, and also a timer, which dictates for how long the bullet should travel. I do a raycast and pass the float how long the bullet should move to the gameobject. But the problem is, that The time it takes from instantiating the bullet, to bullet.GetComponent().startCount(time); is long, and the result is the bullet penetrating the wall.
I would like to know if there is a way to instantiate the prefab with a parameter (in this case, the time) so there is no time delay between the instantiation and the passing the parameter.

This is how I move the bullet:

using UnityEngine;
using System.Collections;

public class bullet : MonoBehaviour {
	public float speed = 80;
	private bool stop = false;

	// Update is called once per frame
	void Update () {
		if (!stop)
			transform.Translate (Vector3.forward * speed * Time.deltaTime);
	}

	public void startCount(float lifeTime){
		StartCoroutine(count(lifeTime));
	}

	IEnumerator count(float lifeTime){
		yield return new WaitForSeconds(lifeTime);
		stop = true;
	}
}

I don’t really get how the time between two lines can be too great since it is done in the same frame so the click counter does increase but you don’t use that, while the frame time is the same for both method.

Now it is true that Instantiate is not the fastest, so you could reduce that overload wit reusing items, particularly for items like projectile that you reused a lot.

I would recommend a pool of object: http://unity3d.com/learn/tutorials/modules/beginner/live-training-archive/object-pooling .

This way you are not creating but just activating/deactivating items.

I’d almost bet on this being a fence post error. Your bullet is moving one physics step too far before the timer expires. Try subtracting the value of Time.deltaTime from your time value before you pass it in.