namespace ProjectM.Client { /// /// Resolves the gameplay camera for the client systems that cursor-raycast against the ground (input aim, /// build placement, aim reticle): , falling back to the /// 's Camera. Single source so the camera-resolution policy lives in one place. /// public static class CameraResolver { public static UnityEngine.Camera Resolve() { var cam = UnityEngine.Camera.main; if (cam == null) { var rig = UnityEngine.Object.FindAnyObjectByType(); if (rig != null) cam = rig.GetComponent(); } return cam; } } }