public void GetRootGameObjects(List <GameObject> rootGameObjects)
{
bool flag = rootGameObjects.Capacity < this.rootCount;
if (flag)
{
rootGameObjects.Capacity = this.rootCount;
}
rootGameObjects.Clear();
bool flag2 = !this.IsValid();
if (flag2)
{
throw new ArgumentException("The scene is invalid.");
}
bool flag3 = !Application.isPlaying && !this.isLoaded;
if (flag3)
{
throw new ArgumentException("The scene is not loaded.");
}
bool flag4 = this.rootCount == 0;
if (!flag4)
{
Scene.GetRootGameObjectsInternal(this.handle, rootGameObjects);
}
}