private void MenuControlSystem() { string fmActionData = InitBLE.GetFMResponse(); Debug.Log("Json Data from Fmdriver : " + fmActionData); if (fmActionData == null || fmActionData == "Make action") { return; } FmDriverResponseInfo singlePlayerResponse = JsonUtility.FromJson <FmDriverResponseInfo>(fmActionData); if (singlePlayerResponse == null) { return; } if (PlayerSession.Instance.currentYipliConfig.oldFMResponseCount != singlePlayerResponse.count) { //Debug.Log("FMResponse " + fmActionData); PlayerSession.Instance.currentYipliConfig.oldFMResponseCount = singlePlayerResponse.count; YipliUtils.PlayerActions providedAction = ActionAndGameInfoManager.GetActionEnumFromActionID(singlePlayerResponse.playerdata[0].fmresponse.action_id); switch (providedAction) { case YipliUtils.PlayerActions.LEFT: ProcessMatInputs(LEFT); break; case YipliUtils.PlayerActions.RIGHT: ProcessMatInputs(RIGHT); break; case YipliUtils.PlayerActions.ENTER: ProcessMatInputs(ENTER); break; } } }