void rawFetchHandler(List <string> fileList) { if (fileList.Count == 0) { if (UnityEngine.UI.Windows.Constants.LOGS_ENABLED == true) { UnityEngine.Debug.LogWarning("No matching data found."); } } else { DateTime start, end; try { start = DateTime.Parse(m_StartDate); } catch { start = DateTime.Parse("2000-01-01"); } try { end = DateTime.Parse(m_EndDate); } catch { end = DateTime.UtcNow; } m_Aggregator.Process(aggregationHandler, fileList, start, end, m_Space, m_Time, m_Angle, !m_AggregateTime, !m_AggregateAngle, m_Events); } }
void ProcessAggregation(List <string> fileList) { if (fileList.Count == 0) { Debug.LogWarning("No matching data found."); } else { DateTime start, end; try { start = DateTime.Parse(m_StartDate).ToUniversalTime(); } catch { start = DateTime.Parse("2000-01-01").ToUniversalTime(); } try { end = DateTime.Parse(m_EndDate).ToUniversalTime().Add(new TimeSpan(24, 0, 0)); } catch { end = DateTime.UtcNow; } if (m_RemapColor && string.IsNullOrEmpty(m_RemapColorField)) { Debug.LogWarning("You have selected 'Remap color to field' but haven't specified a field name. No remapping can occur."); } // When these are the same, points where these values match will be aggregated to the same point var aggregateOn = new List <string>() { "x", "y", "z", "t", "rx", "ry", "rz", "dx", "dy", "dz", "z" }; // Specify groupings for unique lists var groupOn = new List <string>() { "eventName" }; // userID is optional if (m_SeparateUsers) { aggregateOn.Add("userID"); groupOn.Add("userID"); } if (m_SeparateSessions) { aggregateOn.Add("sessionID"); groupOn.Add("sessionID"); } if (m_SeparateDebug) { aggregateOn.Add("debug"); groupOn.Add("debug"); } if (m_SeparatePlatform) { aggregateOn.Add("platform"); groupOn.Add("platform"); } // Arbitrary Fields are included if specified if (m_SeparateCustomField) { aggregateOn.AddRange(m_ArbitraryFields); groupOn.AddRange(m_ArbitraryFields); } // Specify smoothing properties (must be a subset of aggregateOn) var smoothOn = new Dictionary <string, float>(); // Smooth space if (m_SmoothSpaceToggle == SMOOTH_VALUE || m_SmoothSpaceToggle == SMOOTH_NONE) { float spaceSmoothValue = (m_SmoothSpaceToggle == SMOOTH_NONE) ? 0f : m_Space; smoothOn.Add("x", spaceSmoothValue); smoothOn.Add("y", spaceSmoothValue); smoothOn.Add("z", spaceSmoothValue); smoothOn.Add("dx", spaceSmoothValue); smoothOn.Add("dy", spaceSmoothValue); smoothOn.Add("dz", spaceSmoothValue); } // Smooth rotation if (m_SmoothRotationToggle == SMOOTH_VALUE || m_SmoothRotationToggle == SMOOTH_NONE) { float rotationSmoothValue = (m_SmoothRotationToggle == SMOOTH_NONE) ? 0f : m_Rotation; smoothOn.Add("rx", rotationSmoothValue); smoothOn.Add("ry", rotationSmoothValue); smoothOn.Add("rz", rotationSmoothValue); } // Smooth time if (m_SmoothTimeToggle == SMOOTH_VALUE || m_SmoothTimeToggle == SMOOTH_NONE) { float timeSmoothValue = (m_SmoothTimeToggle == SMOOTH_NONE) ? 0f : m_Time; smoothOn.Add("t", timeSmoothValue); } string remapToField = m_RemapColor ? m_RemapColorField : ""; int remapOption = m_RemapColor ? m_RemapOptionIndex : 0; m_Aggregator.Process(aggregationHandler, fileList, start, end, aggregateOn, smoothOn, groupOn, remapToField, m_RemapOptionIds[remapOption], m_Percentile); } }
void ProcessAggregation() { DateTime start, end; try { start = DateTime.Parse(m_StartDate).ToUniversalTime(); } catch { start = DateTime.Parse("2000-01-01").ToUniversalTime(); } try { end = DateTime.Parse(m_EndDate).ToUniversalTime().Add(new TimeSpan(24, 0, 0)); } catch { end = DateTime.UtcNow; } if (m_DateChangeHasOccurred || RawDataClient.GetInstance().m_ManifestInvalidated || m_ViewModel.m_RawDataFileList == null || m_ViewModel.m_RawDataFileList.Count == 0) { RawDataClient.GetInstance().m_DataPath = m_RawDataPath; m_ViewModel.m_RawDataFileList = RawDataClient.GetInstance().GetFiles( new UnityAnalyticsEventType[] { UnityAnalyticsEventType.custom }, start, end); m_DateChangeHasOccurred = false; if (m_ViewModel.m_RawDataFileList.Count == 0) { return; } } if (m_InspectorViewModel.remapDensity && string.IsNullOrEmpty(m_InspectorViewModel.remapColorField)) { Debug.LogWarning("You have selected 'Remap color to field' but haven't specified a field name. No remapping can occur."); } // When these are the same, points where these values match will be aggregated to the same point var aggregateOn = new List <string>() { "x", "y", "z", "t", "rx", "ry", "rz", "dx", "dy", "dz", "z" }; // Specify groupings for unique lists var groupOn = new List <string>() { "eventName" }; // userID is optional if (m_InspectorViewModel.separateUsers) { aggregateOn.Add("userID"); groupOn.Add("userID"); } if (m_SeparateSessions) { aggregateOn.Add("sessionID"); groupOn.Add("sessionID"); } if (m_SeparateDebug) { aggregateOn.Add("debug"); groupOn.Add("debug"); } if (m_SeparatePlatform) { aggregateOn.Add("platform"); groupOn.Add("platform"); } // Arbitrary Fields are included if specified if (m_SeparateCustomField) { aggregateOn.AddRange(m_SeparationFields); groupOn.AddRange(m_SeparationFields); } // Specify smoothing properties (must be a subset of aggregateOn) var smoothOn = new Dictionary <string, float>(); // Smooth space if (m_InspectorViewModel.smoothSpaceOption == SMOOTH_VALUE || m_InspectorViewModel.smoothSpaceOption == SMOOTH_NONE) { float spaceSmoothValue = (m_InspectorViewModel.smoothSpaceOption == SMOOTH_NONE) ? 0f : m_InspectorViewModel.smoothSpace; smoothOn.Add("x", spaceSmoothValue); smoothOn.Add("y", spaceSmoothValue); smoothOn.Add("z", spaceSmoothValue); smoothOn.Add("dx", spaceSmoothValue); smoothOn.Add("dy", spaceSmoothValue); smoothOn.Add("dz", spaceSmoothValue); } // Smooth rotation if (m_InspectorViewModel.smoothRotationOption == SMOOTH_VALUE || m_InspectorViewModel.smoothRotationOption == SMOOTH_NONE) { float rotationSmoothValue = (m_InspectorViewModel.smoothRotationOption == SMOOTH_NONE) ? 0f : m_InspectorViewModel.smoothRotation; smoothOn.Add("rx", rotationSmoothValue); smoothOn.Add("ry", rotationSmoothValue); smoothOn.Add("rz", rotationSmoothValue); } // Smooth time if (m_InspectorViewModel.smoothTimeOption == SMOOTH_VALUE || m_InspectorViewModel.smoothTimeOption == SMOOTH_NONE) { float timeSmoothValue = (m_InspectorViewModel.smoothTimeOption == SMOOTH_NONE) ? 0f : m_InspectorViewModel.smoothTime; smoothOn.Add("t", timeSmoothValue); } string remapToField = m_InspectorViewModel.remapDensity ? m_InspectorViewModel.remapColorField : ""; int remapOption = m_InspectorViewModel.remapDensity ? m_InspectorViewModel.remapOptionIndex : 0; m_Aggregator.Process(OnAggregated, m_ViewModel.m_RawDataFileList, start, end, aggregateOn, smoothOn, groupOn, remapToField, m_RemapOptionIds[remapOption], m_InspectorViewModel.remapPercentile); }