void OnEnable() { EnsureHeatmapInstance(); m_Processor = new HeatmapDataProcessor(); m_RenderView = HeatmapRendererInspector.Init(this, m_Processor); m_RenderView.OnEnable(); m_AggregationView = AggregationInspector.Init(m_Processor); m_ProfileView = HeatmapProfilesInspector.Init(this); m_ProfileView.OnEnable(); m_Processor.RestoreSettings(); m_AggregationView.OnEnable(); }
void OnGUI() { GUILayout.BeginVertical("box"); GUILayout.BeginHorizontal(); if (GUILayout.Button("Reset")) { SystemReset(); } if (GUILayout.Button("Documentation")) { Application.OpenURL("https://bitbucket.org/strangeioc/heatmaps/wiki/Home"); } if (GUILayout.Button("Purge")) { PurgeData(); } GUILayout.EndHorizontal(); GUILayout.EndVertical(); GUILayout.BeginVertical("box"); if (m_AggregationView == null) { m_AggregationView = AggregationInspector.Init(m_EventClient, m_Aggregator); } m_ShowAggregate = EditorGUI.Foldout(EditorGUILayout.GetControlRect(), m_ShowAggregate, "Aggregate Events", true); if (m_ShowAggregate) { m_AggregationView.OnGUI(); GUILayout.BeginHorizontal(); m_LocalOnly = GUILayout.Toggle(m_LocalOnly, new GUIContent("Local only", "If checked, don't attempt to download raw data from the server.")); string fetchButtonText = m_LocalOnly ? "Process" : "Fetch and Process"; if (GUILayout.Button(fetchButtonText)) { SystemProcess(); } GUILayout.EndHorizontal(); } GUILayout.EndVertical(); GUILayout.BeginVertical("box"); if (m_ParserView == null) { m_ParserView = HeatmapDataParserInspector.Init(OnPointData); } if (m_RenderView == null) { m_RenderView = HeatmapRendererInspector.Init(this); } m_ShowRender = EditorGUI.Foldout(EditorGUILayout.GetControlRect(), m_ShowRender, "Render", true); if (m_ShowRender && m_ParserView != null) { m_ParserView.OnGUI(); m_RenderView.OnGUI(); } if (m_HeatMapInstance) { m_RenderView.SetGameObject(m_HeatMapInstance); } GUILayout.EndVertical(); }
void OnEnable() { m_RenderView = HeatmapRendererInspector.Init(this); m_AggregationView = AggregationInspector.Init(m_Aggregator); m_ParserView = HeatmapDataParserInspector.Init(OnPointData); }