I have a Window with 2 child elements: one Text and one BorderImage, created in Editor. I load the layout successfully, but I cant access the BorderImage with this code:
Text@ targetName = ui.root.GetChild("selname", true);
targetName.text = ent.Find(result.drawable.node.name).Name;
BorderImage@ tex = ui.root.GetChild("portrait", true);
if (tex !is null)
tex.texture = ent.Find(result.drawable.node.name).portrait;
else
Print("Element is null!");
I can access the Text element and change its value, but when I try to access the borderImage, I get a null value. If I change element order, placing the Text second in the child hierarchy, I can still access Text element and I dont get the null value for BorderImage , but neither can set its texture. What Im doing wrong here?