< Summary

Class:EarlyFixedUpdateManager
Assembly:bamlab.micromissiles
File(s):/github/workspace/Assets/Scripts/Managers/EarlyFixedUpdateManager.cs
Covered lines:1
Uncovered lines:10
Coverable lines:11
Total lines:25
Line coverage:9% (1 of 11)
Covered branches:0
Total branches:0
Covered methods:2
Total methods:4
Method coverage:50% (2 of 4)

Metrics

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

File(s)

/github/workspace/Assets/Scripts/Managers/EarlyFixedUpdateManager.cs

#LineLine coverage
 1using UnityEngine;
 2
 3// The early fixed update manager allows actions to be executed before the main fixed update call
 4// due to its position in the script execution order.
 5[DefaultExecutionOrder(-50)]
 6public class EarlyFixedUpdateManager : MonoBehaviour {
 7  // Simulation events.
 8  public delegate void UpdateHandler();
 9  public event UpdateHandler OnEarlyFixedUpdate;
 10
 16611  public static EarlyFixedUpdateManager Instance { get; private set; }
 12
 013  private void Awake() {
 014    if (Instance != null && Instance != this) {
 015      Destroy(gameObject);
 016      return;
 17    }
 018    Instance = this;
 019    DontDestroyOnLoad(gameObject);
 020  }
 21
 022  private void FixedUpdate() {
 023    OnEarlyFixedUpdate?.Invoke();
 024  }
 25}