using UnityEngine; public class CubeClash_HazardMarker : MonoBehaviour { public static int ActiveCount = 0; void OnEnable() { ActiveCount++; } void OnDisable() { ActiveCount = Mathf.Max(0, ActiveCount - 1); } void OnDestroy() { ActiveCount = Mathf.Max(0, ActiveCount - 1); } }