< Summary

Class:SceneControllerBridge
Assembly:DCL.Runtime
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/WorldRuntime/Bridge/SceneControllerBridge.cs
Covered lines:0
Uncovered lines:12
Coverable lines:12
Total lines:36
Line coverage:0% (0 of 12)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
LoadParcelScenes(...)0%2100%
SendSceneMessage(...)0%2100%
UnloadSceneV2(...)0%6200%
CreateGlobalScene(...)0%2100%
UpdateParcelScenes(...)0%2100%
BuilderReady()0%2100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/WorldRuntime/Bridge/SceneControllerBridge.cs

#LineLine coverage
 1using DCL.Helpers;
 2using DCL.Models;
 3using System;
 4using UnityEngine;
 5using UnityEngine.SceneManagement;
 6using Environment = DCL.Environment;
 7
 8public class SceneControllerBridge : MonoBehaviour
 9{
 010    public void LoadParcelScenes(string payload) { Environment.i.world.sceneController.LoadParcelScenes(payload); }
 11
 012    public void SendSceneMessage(string payload) { Environment.i.world.sceneController.SendSceneMessage(payload); }
 13
 14    // sceneNumber comes as a string because WebSocketCommunication can only receive strings as kernel message parameter
 15    public void UnloadSceneV2(string sceneNumber)
 16    {
 017        if (!Int32.TryParse(sceneNumber, out int targetSceneNumber))
 18        {
 019            Debug.LogError($"UnloadSceneV2() Int32 failed to parse the received scene number...{sceneNumber}.");
 020            return;
 21        }
 22
 023        Environment.i.world.sceneController.UnloadScene(targetSceneNumber);
 024    }
 25
 26    public void CreateGlobalScene(string payload)
 27    {
 028        CreateGlobalSceneMessage globalScene = Utils.SafeFromJson<CreateGlobalSceneMessage>(payload);
 029        Environment.i.world.sceneController.CreateGlobalScene(globalScene);
 030    }
 31
 032    public void UpdateParcelScenes(string payload) { Environment.i.world.sceneController.UpdateParcelScenes(payload); }
 33
 34    // TODO: Move to Builder Bridge
 035    public void BuilderReady() { UnityEngine.SceneManagement.SceneManager.LoadScene("BuilderScene", UnityEngine.SceneMan
 36}