Skip to content

Commit

Permalink
Add auto-switching editor script
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanslikesocool committed Mar 2, 2021
1 parent eba5a8d commit 41deb8d
Show file tree
Hide file tree
Showing 17 changed files with 130 additions and 119 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>20A5354i</string>
<string>20D74</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
Expand All @@ -27,19 +27,19 @@
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>12A8189n</string>
<string>12D4e</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>11.0</string>
<string>11.1</string>
<key>DTSDKBuild</key>
<string>20A5354g</string>
<string>20C63</string>
<key>DTSDKName</key>
<string>macosx11.0</string>
<string>macosx11.1</string>
<key>DTXcode</key>
<string>1200</string>
<string>1240</string>
<key>DTXcodeBuild</key>
<string>12A8189n</string>
<string>12D4e</string>
<key>LSMinimumSystemVersion</key>
<string>11.0</string>
</dict>
Expand Down
Binary file not shown.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,9 @@
<plist version="1.0">
<dict>
<key>files</key>
<dict>
<key>Resources/Info.plist</key>
<data>
DFW0I/iW4PJviRQ43hnHyArVulo=
</data>
</dict>
<dict/>
<key>files2</key>
<dict>
<key>Resources/Info.plist</key>
<dict>
<key>hash2</key>
<data>
sd5/7Gtl+jS41ROcoDuEni17WQWg4yIhrt9a4VICH3g=
</data>
</dict>
</dict>
<dict/>
<key>rules</key>
<dict>
<key>^Resources/</key>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#if UNITY_EDITOR_OSX
using UnityEditor;

[InitializeOnLoad]
public class EditorThemeSwitcher
{
static EditorThemeSwitcher()
{
EditorApplication.playModeStateChanged += CheckAndSwitchSkin;
CheckAndSwitchSkin(PlayModeStateChange.EnteredEditMode);
}

static void CheckAndSwitchSkin(PlayModeStateChange state)
{
if (state == PlayModeStateChange.EnteredEditMode)
{
if (DarkDetector.IsDarkModeEnabled() ^ EditorGUIUtility.isProSkin)
{
System.Reflection.Assembly.GetAssembly(typeof(UnityEditorInternal.AssetStore)).GetType("UnityEditorInternal.InternalEditorUtility", true).GetMethod("SwitchSkinAndRepaintAllViews").Invoke(null, null);
}
}
}
}
#endif

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

86 changes: 43 additions & 43 deletions Dark Detector Unity/Packages/manifest.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
{
"dependencies": {
"com.unity.2d.sprite": "1.0.0",
"com.unity.burst": "1.4.0-preview.4",
"com.unity.editorcoroutines": "1.0.0",
"com.unity.ide.visualstudio": "2.0.2",
"com.unity.ide.vscode": "1.2.1",
"com.unity.inputsystem": "1.0.0",
"com.unity.nuget.newtonsoft-json": "2.0.0",
"com.unity.properties.ui": "1.5.0-preview",
"com.unity.render-pipelines.universal": "10.0.0-preview.26",
"com.unity.searcher": "4.3.1",
"com.unity.test-framework": "1.1.16",
"com.unity.test-framework.performance": "2.3.1-preview",
"com.unity.textmeshpro": "3.0.1",
"com.unity.ugui": "1.0.0",
"nuget.mono-cecil": "0.1.6-preview",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.androidjni": "1.0.0",
"com.unity.modules.animation": "1.0.0",
"com.unity.modules.assetbundle": "1.0.0",
"com.unity.modules.audio": "1.0.0",
"com.unity.modules.director": "1.0.0",
"com.unity.modules.imageconversion": "1.0.0",
"com.unity.modules.imgui": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0",
"com.unity.modules.particlesystem": "1.0.0",
"com.unity.modules.physics": "1.0.0",
"com.unity.modules.physics2d": "1.0.0",
"com.unity.modules.screencapture": "1.0.0",
"com.unity.modules.ui": "1.0.0",
"com.unity.modules.uielements": "1.0.0",
"com.unity.modules.umbra": "1.0.0",
"com.unity.modules.unityanalytics": "1.0.0",
"com.unity.modules.unitywebrequest": "1.0.0",
"com.unity.modules.unitywebrequestassetbundle": "1.0.0",
"com.unity.modules.unitywebrequestaudio": "1.0.0",
"com.unity.modules.unitywebrequesttexture": "1.0.0",
"com.unity.modules.unitywebrequestwww": "1.0.0",
"com.unity.modules.vr": "1.0.0",
"com.unity.modules.wind": "1.0.0",
"com.unity.modules.xr": "1.0.0"
}
}
"dependencies": {
"com.unity.2d.sprite": "1.0.0",
"com.unity.burst": "1.4.0-preview.4",
"com.unity.editorcoroutines": "1.0.0",
"com.unity.ide.visualstudio": "2.0.5",
"com.unity.ide.vscode": "1.2.3",
"com.unity.inputsystem": "1.0.2",
"com.unity.nuget.newtonsoft-json": "2.0.0",
"com.unity.properties.ui": "1.5.0-preview",
"com.unity.render-pipelines.universal": "10.3.1",
"com.unity.searcher": "4.3.1",
"com.unity.test-framework": "1.1.22",
"com.unity.test-framework.performance": "2.3.1-preview",
"com.unity.textmeshpro": "3.0.1",
"com.unity.ugui": "1.0.0",
"nuget.mono-cecil": "0.1.6-preview",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.androidjni": "1.0.0",
"com.unity.modules.animation": "1.0.0",
"com.unity.modules.assetbundle": "1.0.0",
"com.unity.modules.audio": "1.0.0",
"com.unity.modules.director": "1.0.0",
"com.unity.modules.imageconversion": "1.0.0",
"com.unity.modules.imgui": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0",
"com.unity.modules.particlesystem": "1.0.0",
"com.unity.modules.physics": "1.0.0",
"com.unity.modules.physics2d": "1.0.0",
"com.unity.modules.screencapture": "1.0.0",
"com.unity.modules.ui": "1.0.0",
"com.unity.modules.uielements": "1.0.0",
"com.unity.modules.umbra": "1.0.0",
"com.unity.modules.unityanalytics": "1.0.0",
"com.unity.modules.unitywebrequest": "1.0.0",
"com.unity.modules.unitywebrequestassetbundle": "1.0.0",
"com.unity.modules.unitywebrequestaudio": "1.0.0",
"com.unity.modules.unitywebrequesttexture": "1.0.0",
"com.unity.modules.unitywebrequestwww": "1.0.0",
"com.unity.modules.vr": "1.0.0",
"com.unity.modules.wind": "1.0.0",
"com.unity.modules.xr": "1.0.0"
}
}
24 changes: 12 additions & 12 deletions Dark Detector Unity/Packages/packages-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,28 @@
"url": "https://packages.unity.com"
},
"com.unity.ext.nunit": {
"version": "1.0.0",
"version": "1.0.6",
"depth": 1,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.ide.visualstudio": {
"version": "2.0.2",
"version": "2.0.5",
"depth": 0,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.ide.vscode": {
"version": "1.2.1",
"version": "1.2.3",
"depth": 0,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.inputsystem": {
"version": "1.0.0",
"version": "1.0.2",
"depth": 0,
"source": "registry",
"dependencies": {},
Expand Down Expand Up @@ -115,7 +115,7 @@
"url": "https://packages.unity.com"
},
"com.unity.render-pipelines.core": {
"version": "10.0.0-preview.30",
"version": "10.3.1",
"depth": 1,
"source": "registry",
"dependencies": {
Expand All @@ -124,13 +124,13 @@
"url": "https://packages.unity.com"
},
"com.unity.render-pipelines.universal": {
"version": "10.0.0-preview.26",
"version": "10.3.1",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.mathematics": "1.1.0",
"com.unity.render-pipelines.core": "10.0.0-preview.30",
"com.unity.shadergraph": "10.0.0-preview.27"
"com.unity.render-pipelines.core": "10.3.1",
"com.unity.shadergraph": "10.3.1"
},
"url": "https://packages.unity.com"
},
Expand All @@ -155,21 +155,21 @@
"url": "https://packages.unity.com"
},
"com.unity.shadergraph": {
"version": "10.0.0-preview.27",
"version": "10.3.1",
"depth": 1,
"source": "registry",
"dependencies": {
"com.unity.render-pipelines.core": "10.0.0-preview.30",
"com.unity.render-pipelines.core": "10.3.1",
"com.unity.searcher": "4.3.1"
},
"url": "https://packages.unity.com"
},
"com.unity.test-framework": {
"version": "1.1.16",
"version": "1.1.22",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.ext.nunit": "1.0.0",
"com.unity.ext.nunit": "1.0.6",
"com.unity.modules.imgui": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions Dark Detector Unity/ProjectSettings/ProjectVersion.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
m_EditorVersion: 2020.2.0a21
m_EditorVersionWithRevision: 2020.2.0a21 (3e0d5f775006)
m_EditorVersion: 2020.2.6f1
m_EditorVersionWithRevision: 2020.2.6f1 (8a2143876886)
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 247994e1f5a72c2419c26a37e9334c01, type: 3}
m_Name:
m_EditorClassIdentifier:
m_LastMaterialVersion: 2
m_LastMaterialVersion: 4
Loading

0 comments on commit 41deb8d

Please sign in to comment.