Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2014
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.51 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class Creator : MonoBehaviour {
  5. public GameObject thePrefab;
  6.  
  7.     // Use this for initialization
  8.     void Start () {
  9.  
  10.     }
  11.    
  12.     // Update is called once per frame
  13.     void Update () {
  14.    
  15.                 if (Input.GetKeyDown (KeyCode.R))
  16.                 {
  17.  
  18.     //              GameObject instance = new GameObject ();
  19.                         GameObject MeteorCreator = Instantiate (thePrefab,
  20.                                     transform.position,
  21.                                transform.rotation) as GameObject;
  22.         }
  23.         }
  24.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement