Why isn't my UI.Text being found?

I’m starting to make an incremental/idle clicker game and i’m trying to make a panel for each building (what gives you money in the game), to show how many you have, price, the button to buy, etc. I’m trying to do it so that the object “building (0)” goes to building 0, “building (1)” to building 1, and so on. That part is working, but i’m not being able to get the children of those panels, the texts and buttons. Here’s my script:

	for (var b : int = 0; b < buildings.length; b++) 
	{
		buildings**.panel = GameObject.Find("Canvas/buildings_panel/Scroll Snap Vertical Multiple/List/building (" + b + ")");**

buildings.nameLabel = buildings**.panel.transform.Find(“building_name”) as UI.Text;
//buildings.nameLabel = GameObject.Find(“building (” + b + “)/building_name (” + b + “)”) as UI.Text;
//buildings.nameLabel = buildings.panel.Find(“building_name”) as UI.Text;
//buildings.nameLabel = buildings.panel.gameObject.Find(“building_name”) as UI.Text;**

//buildings.ownedLabel = buildings**.panel.Find(“building_owned”) as UI.Text;
//buildings.perSecLabel = buildings.panel.Find(“building_profit”) as UI.Text;
//buildings.profitLabel = buildings.panel.Find(“building_total_profit”) as UI.Text;**

I’ve tried all these different methods but none of them work. Any thoughts?

Hi there.

You are trying to cast the result from [Transform.Find][1] or [GameObject.Find][2] to