Advertisement
Guest User

Untitled

a guest
Jul 1st, 2016
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4.  
  5. public class BulletPool : MonoBehaviour {
  6.  
  7. //エフェクトのプレハブ
  8. public GameObject effectPrefab;
  9.  
  10. void Start() {
  11. }
  12.  
  13. public void pushButton() {
  14. GameObject newObj = (GameObject)Instantiate(BulletPrefab, Vector3.zero, new Quaternion(0,0,0,0));
  15.  
  16. //どこかのGameObjectの下におきたいとき
  17. newObj.transform.parent = gameObject.transform;
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement