Getting a prefabs child's child

i attempted both things but with no luck i cant seem to figure out what im doing wrong: GameObject PlayerTest = GameObject.Find("GameManager"); Transform Eye = PlayerTest.transform.Find("Eye"); Transform ItemDataBase = Eye.transform.Find("ItemDataBase"); for (int i = 0; i < 21; i++) { if (slot[i].GetComponent<Slot>().empty == true && item.gameObject.GetComponent<ItemPickup>().PickedUp == false) { slot[i].GetComponent<Slot>().item = item; item.GetComponent<ItemPickup>().PickedUp = true; item.transform.parent = ItemDataBase.transform; //item.SetActive(false); } } } }

i get the error: NullReferenceException: Object reference not set to an instance of an object InventoryV2.AddItem (UnityEngine.GameObject item) (at Assets/InventoryV2.cs:54) Inventory.OnTriggerEnter (UnityEngine.Collider other) (at Assets/Scripts/Inventory.cs:14)

/r/Unity3D Thread Parent