public void HandleFeedback(string feedback) { try { if (feedback.StartsWith("<blockProgress")) { BlockProgress blockProgress = ParseFeedbackBlock <BlockProgress>(feedback); //Debug.Log("[blockProgress] " + blockProgress.status + " "+blockProgress.id); if (BlockProgressEventHandler != null) { BlockProgressEventHandler(blockProgress); } } else if (feedback.StartsWith("<predictionFeedback")) { PredictionFeedback predictionFeedback = ParseFeedbackBlock <PredictionFeedback>(feedback); //Debug.Log("[predictionFeedback] " + predictionFeedback.bml.id+" -- "+predictionFeedback.bml.status); if (PredictionFeedbackEventHandler != null) { PredictionFeedbackEventHandler(predictionFeedback); } } else if (feedback.StartsWith("<syncPointProgress")) { SyncPointProgress syncPointProgress = ParseFeedbackBlock <SyncPointProgress>(feedback); //Debug.Log("[syncPointProgress] " + syncPointProgress.id); if (SyncPointProgressEventHandler != null) { SyncPointProgressEventHandler(syncPointProgress); } } else if (feedback.StartsWith("<warningFeedback")) { WarningFeedback warningFeedback = ParseFeedbackBlock <WarningFeedback>(feedback); //Debug.LogWarning("[warningFeedback] " + warningFeedback.id+"\n"+warningFeedback.Value); if (WarningFeedbackEventHandler != null) { WarningFeedbackEventHandler(warningFeedback); } } else { //Debug.LogWarning(feedback); } } catch (System.Xml.XmlException xmle) { Debug.LogWarning("Exception while parsing feedback: " + xmle + "\n\n" + feedback); } finally { //ExperimentLogger.LOG_STRIP_NEWLINES(feedback, "bmlFeedback"); } }
void OnWarningFeedback(WarningFeedback warningFeedback) { Debug.LogWarning("Got warning. Trying removing associated behavior from stack:\n" + warningFeedback.Value); RemoveBehavior(warningFeedback.id); }