Hi, for my pathFinding codes, I need something to copy an entire array and send it to another gameObject with the same code attached…
This is too complicated and too slow, so I need something different:
// exampleCode.js
var pos : Vector3[];
var playerObj : exampleCode.js
var num : int = 0;
function Update () {
...
...
if (pos[pos.length] != Vector3.zero) {
playerObj.pos[num] = pos[num];
num ++;
}
if (num == pos.length) {
Destroy(gameObject);
}
}
I tried this, but I doesn’t seem to be working:
...
...
player.pos = pos;
...
If you have other methods to do that, please tell me
unitron doesn’t even know this word and it’s not signed in the scripting documentation… also, it’s not a member of Vector3.
Sorry, that’s not working :?