MonoBehaviour.Invoke Manual     Reference     Scripting  
Scripting > Runtime Classes > MonoBehaviour
MonoBehaviour.Invoke

function Invoke (methodName : string, time : float) : void

Description

Invokes the method methodName in time seconds.

// Launches a projectile in 2 seconds
var projectile : Rigidbody;
Invoke("LaunchProjectile", 2);
function LaunchProjectile () {
instance = Instantiate(prefab);
instance.velocity = Random.insideUnitSphere * 5;
}