Advertisement
Guest User

here

a guest
Dec 11th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.30 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class shoot : MonoBehaviour {
  5.  
  6.     public GameObject projectile, projectileParent;
  7.  
  8.     private void Fire () {
  9.         GameObject newProjectile = Instantiate (projectile) as GameObject;
  10.         newProjectile.transform.parent = projectileParent.transform;
  11.     }
  12.  
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement