void OnGUI() { GUI.backgroundColor = Color.red; GUILayout.BeginHorizontal(); { if (GUILayout.Button("Next")) { m_tester = m_testers.CircularNext(m_tester); } if (GUILayout.Button("Previous")) { m_tester = m_testers.CircularPrev(m_tester); } } GUILayout.EndHorizontal(); GUI.backgroundColor = Color.white; m_tester.DrawGUI(); }
void Awake() { m_testers = GetComponentsInChildren <PerformanceTester>().ToList(); m_tester = m_testers.First(); }