public void Destroy() { while (vUIElements.Count > 0) { RemoveUIElement(vUIElements[0], true); } RootGameObject.SetParent(null); RootGameObject.Destroy(); }