GUI上での変更方法
書く必要はないかもしれませんが、GUI上での変更方法についても記載しておきます。
Macの場合はメニューバーよりUnity -> Settings...を選択しPreferencesを開き、Preferences -> General -> Editor ThemeをLightかDarkに変更します。

スクリプトでの取得
Preferencesで設定されている値はEditorPrefsを利用することで取得・設定することができます。
結構見つけるのが大変でしたが、UserSkinというkeyにて取得することができます。
// Editor Themeを取得する // 0 = Light, 1 = Dark var userSkin = EditorPrefs.GetInt("UserSkin");
またEditorPrefs.SetIntを実行した後にInternalEditorUtility.SwitchSkinAndRepaintAllViews()を実行することでEditorに適応することができます。
// Editor Themeを設定する EditorPrefs.SetInt("UserSkin", 1); // Editor Themeを適応する InternalEditorUtility.SwitchSkinAndRepaintAllViews();
Preferencesのkeyの探し方
以下のファイルにEditorPrefsのデータが格納されています。
- Mac :
~/Library/Preferences/com.unity3d.UnityEditor5.x.plist - Windows :
HKCU\Software\Unity Technologies\UnityEditor 5.x key
On macOS, EditorPrefs are stored in ~/Library/Preferences/com.unity3d.UnityEditor5.x.plist.
On Windows, EditorPrefs are stored in the registry under the HKCU\Software\Unity Technologies\UnityEditor 5.x key.
EditorPrefs - Unity スクリプトリファレンス
Macの場合はXCodeで開き、該当のそれっぽいkeyを探しましょう。

またUnityCsReferenceを見ることでkeyの予測の手助けになったりもします。
github.com