< Summary

Class:NFTShapeFactory
Assembly:MainScripts
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Components/LoadableShapes/NFTShape/NFTShapeFactory.cs
Covered lines:6
Uncovered lines:1
Coverable lines:7
Total lines:30
Line coverage:85.7% (6 of 7)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
InstantiateLoaderController(...)0%4.594066.67%
NFTShapeFactory()0%110100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Components/LoadableShapes/NFTShape/NFTShapeFactory.cs

#LineLine coverage
 1using UnityEngine;
 2
 3public class NFTShapeFactory : ScriptableObject
 4{
 5    [SerializeField] GameObject[] loaderControllersPrefabs;
 6
 7    static NFTShapeFactory instance = null;
 8    public static NFTShapeFactory i
 9    {
 10        get
 11        {
 2112            if (instance == null)
 13            {
 114                instance = Resources.Load<NFTShapeFactory>("NFTShapeFactory");
 15            }
 2116            return instance;
 17        }
 18    }
 19
 20    public static GameObject InstantiateLoaderController(int index)
 21    {
 722        if (i != null && index >= 0 && index < i.loaderControllersPrefabs.Length)
 23        {
 724            return Object.Instantiate(i.loaderControllersPrefabs[index]);
 25        }
 026        return Object.Instantiate(Resources.Load("NFTShapeLoader_Classic") as GameObject);
 27    }
 28
 229    private NFTShapeFactory() { }
 30}