UnityEngine.SceneManagement.Scene.GetRootGameObjectsInternal C# (CSharp) Method

GetRootGameObjectsInternal() private method

private GetRootGameObjectsInternal ( int sceneHandle, object resultRootList ) : void
sceneHandle int
resultRootList object
return void
        private static extern void GetRootGameObjectsInternal(int sceneHandle, object resultRootList);
        internal enum LoadingState

Usage Example

コード例 #1
0
        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);
            }
        }
All Usage Examples Of UnityEngine.SceneManagement.Scene::GetRootGameObjectsInternal