Was gameObject.GetChild(childsName); a thing?

In my project I am going through old code converting our networking solution from Tnet to Photon.
Up until just now these lines did not throw an error and worked.

login = displayInst.gameObject.GetChild("LoginScreen");
normal = displayInst.gameObject.GetChild("NormalScreen");

After making my networking changes I started getting an error saying :

Type UnityEngine.GameObject' does not contain a definition for GetChild' and no extension method
GetChild of type UnityEngine.GameObject could be found (are you missing a using directive or an assembly reference?)

I have not made any changes to those lines. After some research all I’m seeing the closest thing could be gameObject.Transform.GetChild(index);

Opened the script on another computer without any of the networking changes and MonoDevelop would still AutoComplete gameObject.GetChild(string);

Clearly it’s not a thing now, but was it maybe a few updates ago? Why would my script compile and run just fine before making our networking changes? Working around the issue but still very confused as to what is going on…

attached a screenshot just to prove it

Doing a quick Google search for Unity3D “GameObject.GetChild” yielded up this on the Unity wiki…

http://wiki.unity3d.com/index.php/VWheelCollider

About 60% of the way down you’ll find…

public static class ClassExtensions
{
	// GameObject
	public static GameObject GetChild(this GameObject obj, string name) { return obj.transform.FindChild(name) ? obj.transform.FindChild(name).gameObject : null; }

Which creates a GameObject extension. This is probably what your old project had in it somewhere, or some equivalent extension. It’s possible that it got blown away by something when you made your changes.

I don’t think you need the FindChild thing anymore, in fact that may be deprecated, or at least there were some changes around those find functions awhile back - don’t recall the details.

Turns out gameObject.GetChild(“object name”); is a valid method when using the Tnet namespace.