private Stack<GameObject> ballStack; ballStack = new Stack<GameObject>(); GameObject obj; ballStack.Push(obj); // いれる obj = ballStack.Pop(); // 取り出す