< Summary

Class:Bootstrapper
Assembly:Assembly-CSharp
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/_Common/Bootstrapper/Bootstrapper.cs
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:40
Line coverage:0% (0 of 5)
Covered branches:0
Total branches:0
Covered methods:0
Total methods:1
Method coverage:0% (0 of 1)

Metrics

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

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/_Common/Bootstrapper/Bootstrapper.cs

#LineLine coverage
 1using UnityEngine;
 2
 3public class Bootstrapper : MonoBehaviour
 4{
 5    [SerializeField] private GameObject webGLPrefab;
 6    [SerializeField] private GameObject desktopPrefab;
 7
 8#if UNITY_EDITOR
 9    private enum Platform
 10    {
 11        WebGL,
 12        Desktop,
 13    }
 14
 15    [SerializeField] private Platform currentPlatform;
 16
 17    private void Awake()
 18    {
 019        switch (currentPlatform)
 20        {
 21            case Platform.WebGL:
 022                Instantiate(webGLPrefab);
 023                break;
 24            case Platform.Desktop:
 025                Instantiate(desktopPrefab);
 26                break;
 27        }
 028    }
 29
 30#else
 31    private void Awake()
 32    {
 33#if UNITY_WEBGL
 34        Instantiate(webGLPrefab);
 35#else
 36        Instantiate(desktopPrefab);
 37#endif
 38    }
 39#endif
 40}

Methods/Properties

Awake()