First object works but the second doesnt?

so I have a building that when instantiated finds the needed gameobject and sets the object to true and works. However if I put a second one in, it will leave the find object screen blank. Although when i manually put the needed gameobject into it, it works like the first, but now the first wont activate the object, Any ideas on how to fix this issue?

What request are you using to find the needed gameObject? Are you using Find, FindObjectWithTag, FindObjectOfType, etc?

It may also be effected by where the Instantiated object is instantiated in the hierachy. Sometimes a parent - child relationship can help or hinder what you set out to do.

Share the section of code that you use to locate the needed gameObject

its all good, the answer was I couldn’t get a deactive object, the work around was make a parent and refer to that parent and get the deactive item from the parent that was always on but hidden. Eg., Buttons = GameObject.Find("BarrackButtons").transform.GetChild(0).gameObject; was how i fixed this issue and got the object.