< Summary

Class:GDX.SceneExtensions
Assembly:GDX
File(s):./Packages/com.dotbunny.gdx/GDX/SceneExtensions.cs
Covered lines:0
Uncovered lines:11
Coverable lines:11
Total lines:30
Line coverage:0% (0 of 11)
Covered branches:0
Total branches:0
Covered methods:0
Total methods:1
Method coverage:0% (0 of 1)

Coverage History

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
IsSceneManagerBusy()0%12300%

File(s)

./Packages/com.dotbunny.gdx/GDX/SceneExtensions.cs

#LineLine coverage
 1// Copyright (c) 2020-2024 dotBunny Inc.
 2// dotBunny licenses this file to you under the BSL-1.0 license.
 3// See the LICENSE file in the project root for more information.
 4
 5using UnityEngine.SceneManagement;
 6
 7namespace GDX
 8{
 9    public static class SceneExtensions
 10    {
 11        /// <summary>
 12        ///     Indicates if there are scenes unloading, loading, or scenes that have yet to be integrated and enabled.
 13        /// </summary>
 14        /// <returns>true/false if there is work being done.</returns>
 15        public static bool IsSceneManagerBusy()
 016        {
 017            int sceneCount = SceneManager.sceneCount;
 018            for (int i = 0; i < sceneCount; i++)
 019            {
 020                Scene scene = SceneManager.GetSceneAt(i);
 021                if (!scene.isLoaded)
 022                {
 023                    return true;
 24                }
 025            }
 26
 027            return false;
 028        }
 29    }
 30}

Methods/Properties

IsSceneManagerBusy()