public TimeArea() { m_Settings = new DirectorControlSettings(); float[] tickModulos = new float[] { 0.0005f, 0.001f, 0.005f, 0.01f, 0.05f, 0.1f, 0.5f, 1f, 5f, 10f, 50f, 100f, 500f, 1000f, 5000f, 10000f }; hTicks = new TickHandler(); hTicks.SetTickModulos(tickModulos); }
public ProfilerTimelineGUI(IProfilerWindowController window) { m_Window = window; // Configure default groups groups = new List <GroupInfo>(new GroupInfo[] { new GroupInfo() { name = "", height = 0, expanded = true, threads = new List <ThreadInfo>() }, new GroupInfo() { name = "Unity Job System", height = kGroupHeight, expanded = SessionState.GetBool("Unity Job System", false), threads = new List <ThreadInfo>() }, new GroupInfo() { name = "Loading", height = kGroupHeight, expanded = SessionState.GetBool("Loading", false), threads = new List <ThreadInfo>() }, }); m_LocalizedString_Total = LocalizationDatabase.GetLocalizedString("Total"); m_LocalizedString_Instances = LocalizationDatabase.GetLocalizedString("Instances"); m_HTicks = new TickHandler(); m_HTicks.SetTickModulos(k_TickModulos); }
public void Init(Timeline timeline, PanManipulator panManipulator, ZoomManipulator zoomManipulator) { m_TimelineWidget = new TimelineWidget(); m_PanManipulator = panManipulator; m_ZoomManipulator = zoomManipulator; m_TimeArea = timeline.m_TimelineScrollableArea; m_IMGUIContainer = new IMGUIContainer(() => { GUILayout.Space(0); var lastRect = GUILayoutUtility.GetLastRect(); Rect rt = GUILayoutUtility.GetRect(lastRect.width, 22); GUI.BeginGroup(rt); Rect rect = new Rect(0, 0, rt.width, rt.height); if (rect.width > 0 && rect.height > 0) { if (!FloatComparer.s_ComparerWithDefaultTolerance.Equals(m_DrawInfo.layout.startTime, m_TimelineWidget.RangeStart) || !FloatComparer.s_ComparerWithDefaultTolerance.Equals(m_DrawInfo.layout.Duration, m_TimelineWidget.RangeWidth)) { m_DrawInfo.layout.startTime = m_TimelineWidget.RangeStart; m_DrawInfo.layout.endTime = m_TimelineWidget.RangeEnd; } else { DrawRuler(m_IMGUIContainer.layout, m_SampleRate, timeline.TimelineUnits); } ForwardEvents(rect); } GUI.EndGroup(); }); Add(m_IMGUIContainer); m_TickHandler = new TickHandler(); float[] modulos = { 0.0000001f, 0.0000005f, 0.000001f, 0.000005f, 0.00001f, 0.00005f, 0.0001f, 0.0005f, 0.001f, 0.005f, 0.01f, 0.05f, 0.1f, 0.5f, 1, 5,10, 50, 100, 500, 1000, 5000, 10000, 50000, 100000, 500000, 1000000, 5000000, 10000000 }; m_TickHandler.SetTickModulos(modulos); }