MonoBehaviour.Invokefunction Invoke (methodName : string, time : float) : voidDescriptionInvokes 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; } |
