public override void OnGUI(Rect rect) { Rect r = new Rect(rect); if (m_ShowAutoInstrumemtationParams) { Rect toggleRect = new Rect(r); toggleRect.height = kAutoInstrumentButtonHeight; // TODO: Use reflection and foreach on InstrumentedAssemblyTypes values var newAutoInstrumentedAssemblies = InstrumentedAssemblyTypes.None; if (GUI.Toggle(toggleRect, (m_AutoInstrumentedAssemblyTypes & InstrumentedAssemblyTypes.Script) != 0, s_AutoInstrumentScriptsContent)) { newAutoInstrumentedAssemblies |= InstrumentedAssemblyTypes.Script; } if (newAutoInstrumentedAssemblies != m_AutoInstrumentedAssemblyTypes) { m_AutoInstrumentedAssemblyTypes = newAutoInstrumentedAssemblies; ProfilerDriver.SetAutoInstrumentedAssemblies(m_AutoInstrumentedAssemblyTypes); SessionState.SetInt(kAutoInstrumentSettingKey, (int)m_AutoInstrumentedAssemblyTypes); } r.y += kAutoInstrumentButtonsHeight; r.height -= kAutoInstrumentButtonsHeight; } m_FunctionsList.OnGUI(r); }