Hi
I’m french so forgive me for the mistakes, and I’m also a noob so forgive me for my (stupie) question :
I’m getting a warning because of two implicit downcast (and I know what it means) but I can’t solve the problem :
In fact I’m trying to get a text in the child of an other child (I want to print some things for debuging in the right top corner of the screen from a script in the player object : (player > Camera > Debug text)).
@System.NonSerialized var tex : TextMesh;
// Récupération du texte / Get text
for (var child : Transform in tr)
{
if(child.name == "Camera")
{
for (var child2 : Transform in child)
{
if(child2.name == "Debug Text")
tex = child2.GetComponent(TextMesh);
}
}
}
I tried write “var child : Object” instead of “var child : Transform” but it doesn’t work …
Unrelated : I made a pretty gameplay, who want to try ?