< Summary

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

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Awake()0%3.473062.5%
FixedUpdate()0%220100%

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
 766811  public static EarlyFixedUpdateManager Instance { get; private set; }
 12
 113  private void Awake() {
 114    if (Instance != null && Instance != this) {
 015      Destroy(gameObject);
 016      return;
 17    }
 118    Instance = this;
 119    DontDestroyOnLoad(gameObject);
 120  }
 21
 10422  private void FixedUpdate() {
 10423    OnEarlyFixedUpdate?.Invoke();
 10424  }
 25}