Quantcast
Channel: Answers by "dubbreak"
Viewing all articles
Browse latest Browse all 68

Answer by dubbreak

$
0
0
As roberbu pointed out you're creating copy of the object you have that script on. But then that object creates a copy of itself and so on and so on. First question is: what are you trying to do? I.e. what's your goal. There may be a better way. As for fixing your script, I tested the following as working (creates one copy of object at the location of "target"): using UnityEngine; using System.Collections; public class Spawning : MonoBehaviour { public GameObject target; Vector3 spawnSpot; static bool makeCopy = true; void Start() { if(makeCopy) { makeCopy = false; spawnSpot = target.transform.position; Instantiate(transform, spawnSpot, Quaternion.identity); } } }

Viewing all articles
Browse latest Browse all 68

Trending Articles


Dammapeta Mandal Sarpanch Upa-Sarpanch Mobile Numbers List Khammam District...


Sarah Samis, Emil Bove III


ZARIA CUMMINGS


Need radio code for IVECO Delphi Aptiv FJ5 RBT M16


Black Angus Grilled Artichokes


Ed Sheeran – Sapphire – Pre-Single [iTunes Plus M4A]


Sunny Garcia’s Ex-Wife Colleen McCullough


99 God Status for Whatsapp, Facebook


Funeral of Sir Warwick Franklin


MHDD



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>