Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Simple Instantiation of a Prefab at Start
- var thePrefab : GameObject;
- var myTimer : float = 5.0;
- function Update () {
- if(myTimer > 0){
- myTimer -= Time.deltaTime;
- }
- if(myTimer <= 0){
- var instance : GameObject = Instantiate(thePrefab, transform.position, transform.rotation);
- myTimer = 5.0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement