private void OnEnable() { if (CameraT == null) { return; } if (Target == null) { Target = CameraT.Target; } if (Target == null) { return; } //WaitForEndOfFrame w = new WaitForEndOfFrame(); Debug.Log("Called? " + Target.name); if (!created) { Character.Humus H = Target.GetComponent <Character.Humus>(); if (H == null) { return; } //Target not Human? if (H.GetInventorySpace() == 0) { return; } CreateSlots(H.GetInventorySpace()); AddInventory(H.GetInventory()); created = true; Target.GetComponentInChildren <Character.Inventory>().OnChange += InventoryUI_OnChange; //Might be bad check for it too MakeSelected(H.HoldIndex()); } }