HI there,
I am having difficulty finding and naming a child object.
What I am doing is this…
//Check to see if activeHero has a child.
///if so , this child is a nozzle and must be passed to wpnRealm.
if(activeHero.transform.childCount > 0) //do something
{
print("activeHero.transform.childCount " + activeHero.transform.childCount);
// Find the child "Hand" of the game object
// we attached the script to
activeHero.GameObject.Find("Nozzle");
activeNozzle = GameObject.Find("Nozzle");
}
what I want to achieve is when I find “Nozzle” in the correct parent I want to then assign that Nozzle the var activeNozzle : GameObject. But I am getting this error.