Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- using System.Collections.Generic;
- public class BulletPool : MonoBehaviour {
- //エフェクトのプレハブ
- public GameObject effectPrefab;
- void Start() {
- }
- public void pushButton() {
- GameObject newObj = (GameObject)Instantiate(BulletPrefab, Vector3.zero, new Quaternion(0,0,0,0));
- //どこかのGameObjectの下におきたいとき
- newObj.transform.parent = gameObject.transform;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement