Im making a script that loops threw childs of a object and i need the script to know how many childs it has so that it know when to go back to 0.
here’s a demonstration
var holder : GameObject;
var number : int = 1;
function Update()
{
if(somthing Happens)
{
number += 1;
//some how make this "if" know when "holder" runs out of childs
if()
{
number = 0;
}
}
}
thanks in advance :] and thumb up this question plz