< Summary

Class:StickersController
Assembly:MainScripts
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/StickersController/StickersController.cs
Covered lines:1
Uncovered lines:8
Coverable lines:9
Total lines:20
Line coverage:11.1% (1 of 9)
Covered branches:0
Total branches:0

Metrics

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

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/StickersController/StickersController.cs

#LineLine coverage
 1using UnityEngine;
 2
 3public class StickersController : MonoBehaviour
 4{
 5    private StickersFactory stickersFactory;
 6
 2927    private void Awake() { stickersFactory = Resources.Load<StickersFactory>("StickersFactory"); }
 8
 9    public void PlayEmote(string id)
 10    {
 011        if (stickersFactory == null || !stickersFactory.TryGet(id, out GameObject prefab))
 012            return;
 13
 014        GameObject emoteGameObject = Instantiate(prefab);
 015        emoteGameObject.transform.position += transform.position;
 016        FollowObject emoteFollow = emoteGameObject.AddComponent<FollowObject>();
 017        emoteFollow.target = transform;
 018        emoteFollow.offset = prefab.transform.position;
 019    }
 20}

Methods/Properties

Awake()
PlayEmote(System.String)