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

Why when i'm making array happend these issues??

$
0
0
#pragma strict
var child : GameObject[];
var size;
function Start () {
child = GameObject.Find ("/HeadCannon");
size = 15;
for(var i : int = 0; i < size; i++)
{
create();
}
}
function create() {
Instantiate (child , transform.position , transform.rotation);
}
function Update () {
}
Cannot convert 'UnityEngine.GameObject' to 'UnityEngine.GameObject[]'

No appropriate version of 'UnityEngine.Object.Instantiate' for the argument list '(UnityEngine.GameObject[], UnityEngine.Vector3,...

Why when i'm making array happend these issues??

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



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