Hi guys,
Can i write it shorter ?
if (hit.collider.tag=="checkpoint"){
toto = hit.gameObject;
pathLogo = toto.name+ "/logo";
leLogo = gameObject.Find(pathLogo);
Destroy (leLogo);
}
Thanks; in advance
Freid
Hi guys,
Can i write it shorter ?
if (hit.collider.tag=="checkpoint"){
toto = hit.gameObject;
pathLogo = toto.name+ "/logo";
leLogo = gameObject.Find(pathLogo);
Destroy (leLogo);
}
Thanks; in advance
Freid
if (hit.collider.tag=="checkpoint"){
Destroy(hit.collider.transform.Find("logo").gameObject);
}
Making scrunched up, barely readable code is a hobby of mine.
But the key thing you’re looking for, I think, is transform.Find(“logo”)
Thanks StarManta,
it helps a lot. Unity 3D is so easy, that my main (and almost only) difficulty is (i guess) cibling. Something like a hierarchical graph picture in the documentation maybe could help silly guys like me :roll:
But your message pointed me to reread the Transform doc, and i dare to think that i will slowly get it ! I was a bit confused with relation between transform gameObject.