Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

Instantiate problem

$
0
0
Hey!
I have an object of which i want to make couple of clones that move independently of their master.
I am facing problem where when I call Instantiate there is a spawn of couple hunderds of clones which crashes my unity.
Any help would be appreciated.

#
Code (JavaScript):
  1.  
  2. #pragma strict
  3. var x:double=0.0;
  4. var meteor : GameObject;
  5.  
  6. var y:double=0.0;
  7. var angle:double=0;
  8. var myArray = new Array();
  9. var l : GameObject;
  10. var flag=0;
  11.  
  12. function Start ()
  13. {
  14.     angle=Random.Range(0.1, 2);...
Instantiate problem

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



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