private void Start() { networkingService = NetworkingService as INetworkingService; networkingService.DataReceived += OnDataReceived; matchMakingService = MatchMakingService as IMatchMakingService; matchMakingService.Connect(); headsetCalibration.Updated += OnHeadsetCalibrationUpdated; }
private void Start() { CalibrationDataHelper.Initialize(); dslrIntrinsics = CalibrationDataHelper.LoadCameraIntrinsics(cameraIntrinsicsPath); if (dslrIntrinsics == null) { throw new Exception("Failed to load the camera intrinsics file."); } else { Debug.Log($"Successfully loaded the provided camera intrinsics file: {dslrIntrinsics}"); } networkingService = NetworkingService as INetworkingService; if (networkingService != null) { networkingService.DataReceived += OnDataReceived; } matchMakingService = MatchMakingService as IMatchMakingService; if (matchMakingService != null) { matchMakingService.Connect(); } if (headsetCalibration != null) { headsetCalibration.Updated += OnHeadsetCalibrationUpdated; } var arucoDatasetFileNames = CalibrationDataHelper.GetArUcoDatasetFileNames(); foreach (var fileName in arucoDatasetFileNames) { var dslrTexture = CalibrationDataHelper.LoadDSLRArUcoImage(fileName); var headsetData = CalibrationDataHelper.LoadHeadsetData(fileName); if (dslrTexture == null || headsetData == null) { Debug.LogWarning($"Failed to locate dataset: {fileName}"); } else if (!ProcessArUcoData(headsetData, dslrTexture)) { Debug.LogWarning($"Failed to process dataset: {fileName}"); } else { CalibrationDataHelper.SaveDSLRArUcoDetectedImage(dslrTexture, fileName); CreateVisual(headsetData, fileName); } } }
public MatchMakingController(IGuardianService guardianService, IMatchMakingService matchMakingService) { _guardianService = guardianService; _matchMakingService = matchMakingService; }