TestRunnerWindowSettings.cs 637 B

1234567891011121314151617181920212223242526
  1. namespace UnityEditor.TestTools.TestRunner
  2. {
  3. internal class TestRunnerWindowSettings
  4. {
  5. public bool verticalSplit;
  6. private readonly string m_PrefsKey;
  7. public TestRunnerWindowSettings(string prefsKey)
  8. {
  9. m_PrefsKey = prefsKey;
  10. verticalSplit = EditorPrefs.GetBool(m_PrefsKey + ".verticalSplit", true);
  11. }
  12. public void ToggleVerticalSplit()
  13. {
  14. verticalSplit = !verticalSplit;
  15. Save();
  16. }
  17. private void Save()
  18. {
  19. EditorPrefs.SetBool(m_PrefsKey + ".verticalSplit", verticalSplit);
  20. }
  21. }
  22. }