mirror of
https://github.com/0x7c13/Pal3.Unity.git
synced 2026-11-26 17:38:10 +08:00
Enable DarkMode for UnityEditor on Windows 11
This commit is contained in:
1 parent
66324a805b
commit
95fc8445df
7 files changed
+79
No files matched your search
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6ad9d37f30936d443808108b6c4ba7a8
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,28 @@
|
||||
// ---------------------------------------------------------------------------------------------
|
||||
// Copyright (c) 2021-2024, Jiaqi (0x7c13) Liu. All rights reserved.
|
||||
// See LICENSE file in the project root for license information.
|
||||
// ---------------------------------------------------------------------------------------------
|
||||
|
||||
#if UNITY_EDITOR_WIN
|
||||
namespace Editor.Theme
|
||||
{
|
||||
using System.Runtime.InteropServices;
|
||||
using UnityEditor;
|
||||
|
||||
public static class DarkMode
|
||||
{
|
||||
[DllImport("UnityEditorDarkMode.dll", EntryPoint = "DllMain")]
|
||||
private static extern void EnableUnityEditorDarkModeForWindows11();
|
||||
|
||||
[InitializeOnLoadMethod]
|
||||
public static void EnableDarkMode()
|
||||
{
|
||||
if (System.Environment.OSVersion.Version.Major >= 10 &&
|
||||
System.Environment.OSVersion.Version.Minor >= 0)
|
||||
{
|
||||
EnableUnityEditorDarkModeForWindows11();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 01454dee4bc24e1eb24afe5cc5d13444
|
||||
timeCreated: 1712329038
|
||||
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
menubar_textcolor = 200,200,200
|
||||
menubar_textcolor_disabled = 160,160,160
|
||||
menubar_bgcolor = 48,48,48
|
||||
menubaritem_bgcolor = 48,48,48
|
||||
menubaritem_bgcolor_hot = 48,48,48
|
||||
menubaritem_bgcolor_selected = 48,48,48
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 33e6c7cdc5b29f04fa2606a683cbedee
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,27 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 58773673d1527814c9b01d9978f1077a
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in new issue
Block a user