GithubHelp home page GithubHelp logo

modifyeditorstyle's Introduction

ModifyEditorStyle

screenshot 1

screenshot 2

  • Copy ModifyEditorStyle.cs to your Editor folder or use UPM with this repo when that is possible. (Add this line "com.e7.modify-editor-style": "git://github.com/5argon/ModifyEditorStyle.git", to your packages.json)
  • Change fonts in the Preference menu with fonts installed in your OS.

modifyeditorstyle's People

Contributors

5argon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

modifyeditorstyle's Issues

Overridden prefab is not bold

Using the new prefab workflow this is alleviated somewhat with the blue line. But all versions prior will lose an indicator of which is an override.

Where is Editor folder and how to use it?

Sorry I'm beginner of Unity and I want to change default editor font family and size.
I'm using macOS Mojave, Unity 2018.3.0f1.
How can I run this codes? Where is Editor folder in my mac?
Thanks in advance.

Assets/Editor/ModifyEditorStyle.cs(250,94): error CS0117: `UnityEditor.SettingsScopes' does not contain a definition for `Any'

Does this script work in 2018.3.0f1?

I get these error, please let me know if I'm missing something. Thanks a lot.

Assets/Editor/ModifyEditorStyle.cs(250,94): error CS0117: `UnityEditor.SettingsScopes' does not contain a definition for `Any'
Assets/Editor/ModifyEditorStyle.cs(251,11): error CS1502: The best overloaded method match for `UnityEditor.SettingsProvider.SettingsProvider(string, UnityEditor.SettingsScope, System.Collections.Generic.IEnumerable<string>)' has some invalid arguments
Assets/Editor/ModifyEditorStyle.cs(251,22): error CS1503: Argument `#2' cannot convert `UnityEditor.SettingsScopes' expression to type `UnityEditor.SettingsScope'

Everything resets on scene change

When double click a scene to load it, all fonts are reset to default but the custom size remains. Currently I patch it by adding a callback that calls the Modify again on scene change. I found that those static that stores the generated fonts were reset to null on editor scene load and so it disconnects all reference to this font, falling back to default font.

Doesn't appear to work in Ubuntu 18.04

Hello,

Great work on this project, I love that you coded together a solution to the tremendous failing of the Unity dev team.

However, following the instructions in the readme doesn't seem to cause any changes to the preferences menu to Unity Editor installed via Unity Hub on ubuntu 18.04. Any advice?

Font members of `EditorStyles` is no longer using backing fields since 2019.3

Since Unity 2019.3, the properties to get fonts (e.g EditorStyles.standardFont) is changed from getting the value from a backing field to calling EditorResources.GetFont(FontDef.Style.[style]), and the backing field seems to be removed. Changes : UnityCsReference 2019.2 -> UnityCsReference 2019.3

Therefore these lines :

//EditorStyles static was pulled from s_Current which was populated from `EditorGUIUtility.GetBuiltinSkin` which we cannot interfere.
//s_Current is internal and therefore we need to reflect to change the font. All other styles are accessible except the fonts.
var eType = typeof(EditorStyles);
var es = (EditorStyles)(eType.GetField("s_Current", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null));
eType.GetField("m_StandardFont", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(es, normalFont);
eType.GetField("m_BoldFont", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(es, boldFont);
eType.GetField("m_MiniFont", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(es, smallFont);
eType.GetField("m_MiniBoldFont", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(es, smallBoldFont);

will throw either NullPointerException or FieldNotFoundException and the code will no longer works.

Some default Arial fonts are small

The new override replace all fonts with a fixed size. In default Unity some font was smaller than others like the layer dropdown selector. We could use a different .fontSize (-2 ?) for those.

When was EditorStyles.miniPullDown introduced?

Not available in 2017.1.5f1 but available in 2018.3.0b7, not sure when was it added. If we know, then we could add a preprocessor directive surrounding it instead of commenting out.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.