I moving the object to slot object with drag and drop and when the object dropped to slot, it being child of that.
when i press next button, I want removing object with children at list but does not work. the childs of
the slots are still standing there.
for (int i = 0; i < questionData.answer.Length; i++)
{
GameObject slotGameObject = slotsObjectPool.GetObject();
slots.Add(slotGameObject);
slotGameObject.transform.SetParent(slotPanel);
}
void RemoveSlots()
{
while (slots.Count > 0)
{
slotsObjectPool.ReturnObject (slots [0]);
slots.RemoveAt (0);
}
}