Search Unity

[Zios] Editor Theme Support

Discussion in 'Assets and Asset Store' started by Brad-Smithee, Jun 18, 2016.

  1. IzzySoft

    IzzySoft

    Joined:
    Feb 11, 2013
    Posts:
    376
    if only we could now have the EditorWindow's Tab.. size to Fit.. work a little better. ;)
    ex:
     
  2. shawn

    shawn

    Unity Technologies

    Joined:
    Aug 4, 2007
    Posts:
    552
    Unfortunately, that's one of those hard coded values, not handled with styling. We'll need to actually rewrite a bit of code to handle this case.
     
    Harinezumi likes this.
  3. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,037
    I like this theme thing, but I don't like that the menu titles become all uppercase. Even MS have moved away from that style lately, haven't they? Plus I'm using it on a Mac.
     
  4. AwesomeX

    AwesomeX

    Joined:
    Sep 10, 2013
    Posts:
    117
    Yeah, I agree. The font needs changing. It looks horrid when you try to name/rename a folder, too.
     
  5. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,037
    Everything about fonts/keming/spacing in the editor is generally horrible though ;)

    Narrower non-capslock menu text would be very nice. Other than that I have two great themes for different lighting conditions.
     
  6. Eshado

    Eshado

    Joined:
    Jun 28, 2016
    Posts:
    1
    Well done, fellow programmer, for I also develop the code.. Zixzax would be proud.
     
  7. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,148
    Nice job. Love the simplicity theme you included.

    I was messing around with this last year and gave up after realising how much effort it would be to make changes to all the defined styles; never mind the "hard coded" stuff; and testing every editor window!

    I see my editor tools do not play well with it. I guess it is because I grab styling from Unity's styles before the custom theme is applied. Will investigate. When does your tool load the theme? I see that if my editor windows are opened after Unity started then it is fine. If they were open while Unity restarts then things are messy. So it is just a timing issue - OnGUI from my editor windows called and thus the styles initialised before the theme is applied.

    Something else that looks broken is ReorderableList.

    Now we need an editor and more settings. Ability to change the font size for various areas of the editor, like the Project or Hierarchy entries for example. But I know this is kinda hard with current limitations like the line height.

    Hope this is the start of Unity adding official support for custom theming of the editor - or making it easier for tools like this :)

    [edit] Having the editor textures in the project is a bit messy since they come up when you want to assign a texture to an image field. Maybe look into moving them into a zip or asset bundle.

    [edit2] I use EditorGUIUtility.isProSkin to check if I should load a dark or light version of icons. So this can cause the chosen icon to not work well with a theme. I suppose we would need something better to indicate if a them/background is dark or light and probably require a callback to tell the custom editor to reload its resources when the colours/theme changes. This is something we need from Unity's side since I can't depend on your DLLs for users who uses my tool but do not install your theme system. Except of course if I can just include it with my tools.
     
    Last edited: Jun 29, 2016
  8. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    This is an incredible effort. And open source! Much appreciated mate. Will be following this thread and the public repo.
     
    SememeS likes this.
  9. Brad-Smithee

    Brad-Smithee

    Joined:
    Sep 9, 2012
    Posts:
    33
    Their level of distinction should depend on your palette colors. I originally had them (and many other elements) using hard black and white backdrops on active/hover events, but I transitioned to palette reliance for better interface uniformity. Try adjusting your palette's colors.

    All-caps and small-caps fonts are still widely used typography practices in interface but yes, I realize that some people do find them abrasive. This was one reason I limited their usage to headers/buttons and stated future plans to support font swaps. Speaking of, I've recently added just that. These come in the form of "font-sets" that behave in a similar manner to palettes. Should be coming to the GIT repository soon (ideally).

    As was stated previously, this was due to a missing style assignment (of which there are many since this is a work-in-progress theme). Incidentally, I've finally tracked it down to RenameOverlay.s_DefaultTextFieldStyle. Should be fixed in the upcoming commit/release.

    Very interesting error. I urge one of you to file this one on the github issue tracker.

    Just for clarification, Zios is just a broad moniker for the framework and development group -- not the name of this theme support addon. In time, I plan to release other systems and usability enhancements from the framework.

    Thanks for testing! I'd not yet done any AssetStore addon tests when building groundwork support, but I certainly will put it on my to-do. As long as a custom editor/inspector/drawer uses default immediate-mode-GUI Draw methods (or with styles from EditorStyles/EditorSkin.Inspector), it should appear correctly. Naturally, it won't really be able to support inline or completely custom GUISkin/GUIStyles.

    A fellow explorer! I'd been toying with the idea of this since Unity 3 when I stumbled across the potential, but I'd always felt someone else was bound to pursue it sooner than later. Yes, it was indeed a lot of effort, but I've always had a fascination with extending and building support systems -- especially while working under obscure limitations. The theme I've provided is still far from complete, but I did try to test it on a large majority of the built-in elements I was aware of.

    Presently, I apply the theme during an OnGUI hook due to most GUISkin/GUIStyle operations demanding it. Short of requiring a special editor window to be open, the only two delegates Unity provided for this were EditorApplication.projectWindowItemOnGUI and EditorApplication.hierarchyWindowItemOnGUI. I can certainly attempt the idea of offsetting the loading to a (hidden) startup EditorWindow or circumventing the need for GUI functions by reflecting the data I need. I'll just need an example addon/environment to test with.

    Broken visually or functionally? If the former, it is likely one (of many) things that have yet to receive styling. I'd thought that ScriptExecutionOrder used one, but perhaps I was mistaken. If you can point me to a native element that displays a ReorderableList, I'll get to resolving the problem.

    This was one reason I've delayed on producing a tutorial for editing and building themes. As much that's been done to provide and standardize configurations and containers, the process is still daunting. I need to build a better GUISkin inspector, provide a GUIContent editor, and offer solutions for generating unityTheme, unityPalette, and unityFontset files within the editor.

    Besides that, one thing I'd lightly pursued was a custom implementation of cascading-style-sheets (CSS) that auto-built into proper GUISkin/GUIStyles for multi-element style assignment. However, due to the nature of Unity's interface lacking any real immediate-mode GUI hierarchy (besides untrackable foldout and vertical/horizontal groups), the idea of manipulating styles via a cascade quickly became impractical. Instead, I plan to do a variation on the idea as a queryable-style-sheet. This would allow simple search queries to be used to find GUIStyles in a GUISkin. So, for instance, you could do name[*button] to apply a particular style to anything that has button in its title. It won't always be practical to generalize all fields, but it should offer a lot of headway towards better maintenance. I've not begun support on this just yet, but it's certainly on my to-do to generalize (and simplify) style tracking and assignment.

    I agree. That would certainly be wonderful. Editor extension support has certainly come a long way since early Unity days, but it would always be nice to put it a cut above the competition by allowing addons to control more aspects more easily.

    I suppose I could obfuscate their names to avoid them showing up in non-type searches; however, they do need to be available somewhere in the project's Assets folder else the AssetDatabase cannot associate the fonts/textures properly (which are using by the various GUISkin). I'd loved to have kept the system as a universal extension/module that's handled globally for all projects, but I'd not quite ironed out the kinks in distributing it in this manner. I could create a load-time symlink to centralize the location of the assets and keep them AssetDatabase readable, but it'd require jumping through a few hoops to manage (and even then would still be searchable).

    As far as I am aware, using an Assetbundle would only be a half-measure since only specific known types are usable. Additionally, keeping the assets exposed as files/folders provides a much easier time when building a new theme or tweaking existing ones -- granted I realize not all end-users may have need for this functionality. Perhaps Unity will one day offer a solution for discluding a file/folder from searches via a special character much in the way you can start a file/folder with "." or end it in "~" to prevent AssetDatabase importing.

    If all else fails, I will likely be rolling custom hierarchy/project/inspector windows with better search functionality, variable line height, and extended ordering/grouping/manipulation features.

    Splendid idea. You can always safely read the EditorPrefs I have set to determine if the theme system exists (and what settings it has). In an upcoming commit, I've added an EditorPref bool for "EditorTheme-Dark" which will be true if the theme's window color is at an average component intensity of less than 0.4. When it's available, the following should be a fairly reliable way to add support in your existing code without breaking things :

    Code (csharp):
    1. EditorGUIUtility.isProSkin || EditorPrefs.GetBool("EditorTheme-Dark")
    Postscript : If anyone has additional feedback, would like to collaborate closely on this or other addons, or just would like a fellow developer to pick brains with, I would love to hear from you from one of the contact methods in my original post.
     
    SememeS and orb like this.
  10. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,037
    More usability improvements? orb likey!
     
  11. darkhog

    darkhog

    Joined:
    Dec 4, 2012
    Posts:
    2,218
    Maybe add palette colors just for them? I like my interface dark so I don't want change that because of things like this. If I change palette colors either I get too light theme or toggles/tabs are unreadable. Also could we do away with the italics for prefab objects? I think icon does its job indicating it's a prefab just fine.
     
    Last edited: Jul 2, 2016
  12. punk

    punk

    Joined:
    Jun 28, 2013
    Posts:
    408
    This is really cool, great work.

    The main issues for me atm as others have mentioned are

    1. Forced capitalization - bad idea, makes it really hard to read especially if you have a bunch of windows open and ruins your camel case class names if you use script inspector like me.

    2. Overwriting of custom editor script styles

    it's a pretty awesome start tho well done ;)
     
  13. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Whoa this is awesome, gonna dive into these tool and trying some styling.
    Please change the capitalization or at least add an option to disable it.

    Using assetbundle might be a good idea to keep the project clean and it would make the design distribution or sharing easier (maybe). Practically if we want to redesign the editor we should work on clean project dedicated for editor styling only, then build the final asset bundle and distribute it to entire team. Just my two cent :)
     
  14. Brad-Smithee

    Brad-Smithee

    Joined:
    Sep 9, 2012
    Posts:
    33
    I've been a bit at a distance and focused on the system itself since the forum change (and subsequent reversion); however, a swarm of fixes, features, and fontset support has existed for a few weeks now in the Github repository -- just not as a release due to stability concerns. Since then, I've done a LOT of work on refactoring, applying fixes, and extending additional features. These changes should be merged from the core SVN soon and should address most complaints/requests.

    Additionally, I've worked with Leslie on reaching a solution for editor extension creators to check and adjust their styles accordingly based on the existence (and setup) of the theme system. This should be covered in more depth when the documentation gets an update to reflect the next release.

    Would be convenient, sure, but from my brief testing, there seem to be several asset types that cannot be properly included in assetbundles (including the custom config files I've created). A zip would be a viable option, but I'd need to handle parsing and building the data types myself. Besides issues loading things like Font/GUISkin manually (non-imported), I'd have to come up with a solution to preserve internal references. In the end, I'd need to either extract the contents to the assets directory anyhow or come up with a means to manually inject assetdatabase entries so that the GUISkin image/font references would function properly.
     
    Last edited: Jul 27, 2016
  15. Brad-Smithee

    Brad-Smithee

    Joined:
    Sep 9, 2012
    Posts:
    33
    A pre-release of the latest version (r518) is now available. Feedback appreciated.
    Updated documentation and changelog on its way soon.

    Note : Previous Themes folder and dlls need to be removed prior to installation. In the event this was not done properly and missing file notifications arise upon opening editor, consider removing "Library/metadata" and "Library/assetDatabase3" to force your asset database to rebuild.
     
    Last edited: Aug 2, 2016
    Fab4 and Novack like this.
  16. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    i think we might need a tutorial or at least a small sample how to create a theme
     
  17. Fab4

    Fab4

    Joined:
    Sep 30, 2012
    Posts:
    114
    This was a great update.
     
  18. ponasoft

    ponasoft

    Joined:
    Oct 6, 2013
    Posts:
    42
    its very cool.
     
  19. SubtleTouch

    SubtleTouch

    Joined:
    Sep 17, 2016
    Posts:
    1
    Dude yes! <3
    Works perfect on the latest MacOS along with latest unity personal 5.4.1.f1. Thanks a lot my man. First post here goes out to you. <3 <3
     
  20. HellsPlumber

    HellsPlumber

    Joined:
    Aug 17, 2014
    Posts:
    42
    You are an absolute hero!
    Finally I can work at night without my eyes burning & keeping others awake with the light!

    Thankyou so much for this, please keep it functional with the latest Unity versions.
    I'd hate to ever have to go back to Light theme.
     
    SememeS likes this.
  21. BigBadPanda

    BigBadPanda

    Joined:
    Nov 28, 2014
    Posts:
    11
    You are just fantastic!

    You've done a great job for this community, thank you sir.
     
    SememeS likes this.
  22. Zargy

    Zargy

    Joined:
    Jul 13, 2014
    Posts:
    17
    It looks like 5.5 has broken it. Is everyone having this issue?
     
  23. Fab4

    Fab4

    Joined:
    Sep 30, 2012
    Posts:
    114
    Yes it does not work anymore
     
  24. anatomi

    anatomi

    Joined:
    Jan 9, 2016
    Posts:
    7
    It's working for me, just slightly broken.
     
  25. Zargy

    Zargy

    Joined:
    Jul 13, 2014
    Posts:
    17
    How did you get it to work?
     
  26. anatomi

    anatomi

    Joined:
    Jan 9, 2016
    Posts:
    7
    Didn't do anything special. Installed it as usual. I get a few errors, but it works for the most part.
     
  27. Telliax

    Telliax

    Joined:
    Jan 2, 2017
    Posts:
    1
    I can confirm that it works for 5.5, at least at first glance . Yes, it spams NullReference exceptions on startup, and I had to restart IDE a couple of times to see the new themes in "Preferences", but in the end I managed to get a dark background with clearer fonts. And that's all I asked.
     
    Novack likes this.
  28. Brad-Smithee

    Brad-Smithee

    Joined:
    Sep 9, 2012
    Posts:
    33
    I haven't been working on the theme system since August of last year as I did not imagine there was much interest -- based on minimal feedback I received in messages, this thread, and multiple reddit entries. In light of the recent posts here and the github issue tracker piling up, I've begun working on some hotfixes for 5.5 support. Additionally, I hope to finish an alternate skinset I started a while back that adds a gradient/glass style option (utilizing existing palettes).

    Example : Solid compared to Gradient. Same Palette.
     
  29. T_E

    T_E

    Joined:
    Jan 17, 2017
    Posts:
    3
    This saved my life... I want to try Unity for free 1-2 months before I pay for it...
    The bright UI burnt my eyes out and gave me headaches... this saved the day!
    This is a feature every great Company should put into their software...
    Thanks a lot and continue your great work!
     
    Novack likes this.
  30. uwbadger93

    uwbadger93

    Joined:
    Jan 11, 2017
    Posts:
    1
    Absolutely awesome!!! worked first shot on my imac.
     
  31. NagaPadoha

    NagaPadoha

    Joined:
    Jan 24, 2017
    Posts:
    1
    Thank you Thank you Thank you Thank you Thank you Thank you Thank you so so so so so much I am so happy with everything about this, my eyes are grateful, and having an aesthetically pleasing work space really helps me stay happy and focused and did I mention thank you? Thank you.
     
    Tapgames likes this.
  32. nrlnd

    nrlnd

    Joined:
    Mar 13, 2012
    Posts:
    12
    Thank you!!!!!! Never thought this day would come : D
     
    SememeS likes this.
  33. Brad-Smithee

    Brad-Smithee

    Joined:
    Sep 9, 2012
    Posts:
    33
    Zios Themes [r549] now available.

    [Changes]
    • Significant performance improvements when entering/exiting play mode.
    • Lazy loading of theme assets (after initial setup) for improved initial load times.
    • Added Automatic palettes that use either 1 or 3 base colors for quick user customization.
    • Added Obsidian and ObsidianB palettes at user's request.
    • Refined Lavender, Leather, and Silversky palettes for better usability.
    • Added support for fragment skinsets. These are used to allow grouping of guiStyles belonging to the same skin.
    • Added support for theme variants. These are partial skinsets that rely on a base skinset.
    • Added "Classy Forms" Simplicity variant which uses more defined buttons/controls.
    • Added "Default Margins" Simplicity variant for using default unity margins (prevents play mode flicker in inspectors)
    • Added "Windows Brushed" Simplicity variant as an alternative aesthetic.
    • Added Copy/Paste support for Palettes/Fontsets via context menu.
    • Added option to fully Disable System.
    • Undo/Redo static class support (for Themes Preferences).
    • Separated versions of theme system based on Unity version.
    • Created sister GUISkin Editor project for easier maintenance of guiskin files.

    [Installation]
    • Delete all existing ZiosTheme dlls and Themes folders.
    • Download zip based on your Unity version (based on the last number set)

     
    Last edited: Feb 22, 2017
    SememeS, JCorvinus, Evil_Moo and 4 others like this.
  34. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    Awesome-tastic man!! Thanks a ton for the work you're doing!

    You have twitter or something? How can we help communicate this?
     
  35. Brad-Smithee

    Brad-Smithee

    Joined:
    Sep 9, 2012
    Posts:
    33
    I don't have any social media accounts, but feel free to post links anywhere pointing to the github (or this thread). I'm easiest to reach directly on Discord as the user Bradical.
     
    Novack likes this.
  36. spryx

    spryx

    Joined:
    Jul 23, 2013
    Posts:
    557
    This is incredible! I have been dying for custom unity themes. UT, please make something like this official.
     
  37. mysticfall

    mysticfall

    Joined:
    Aug 9, 2016
    Posts:
    649
    My quick customization attempt to make it match my KDE's default theme. Just to show off :)

    Anyway, it made my experience with Unity Editor ten times better. Thanks much for this amazing project!

    Unity.png
     
    budukratok, Novack and SememeS like this.
  38. SememeS

    SememeS

    Joined:
    Nov 27, 2012
    Posts:
    127
  39. gamearti5t

    gamearti5t

    Joined:
    May 25, 2016
    Posts:
    19
    First off - wow, this looks amazing!

    However for some reason it does not work at all for me on O SX.
    I am using Unity 5.5.2p3, dragged the complete unzipped folder into the Assets folder, Unity imports the files but nothing happens. Under Unity/Preferences there is no Themes option to select - see attached screenshot.

    Did I miss anything? Really looking forward to some help.

    Thanks so much guys!

    Screen Shot 2017-03-20 at 1.23.32 AM.png
     
  40. JadenKorn

    JadenKorn

    Joined:
    Sep 11, 2014
    Posts:
    5
    Looked into it and have fixed the affected release. The ZiosThemes.dll file wasn't set to be an Editor-only .dll, which is what it prevented from being loaded properly.
     
    gamearti5t likes this.
  41. gamearti5t

    gamearti5t

    Joined:
    May 25, 2016
    Posts:
    19
    @JadenKorn Thanks a lot mate - works like a charm now!
     
  42. gamearti5t

    gamearti5t

    Joined:
    May 25, 2016
    Posts:
    19
    Hi guys, the skins look amazing and they work great!

    However I ran into a weird bug and I hope you guys can help me.

    It seems when I have the @Themes installed in Unity 5.5.2p3 I am not able to deactivate animated materials in the viewport anymore, which causes Unity to run at 100% CPU usage. Without the @Themes being used I am able to deactivate animated materials in the viewport and the CPU usage is minimal. I am using a lot of grass (Infinigrass) and trees.

    Any ideas?
     
  43. Brad-Smithee

    Brad-Smithee

    Joined:
    Sep 9, 2012
    Posts:
    33
    The latest release (r573) should work on MacOS 5.5.2. Did you grab the correct zip matching your OS/version?
     
  44. Brad-Smithee

    Brad-Smithee

    Joined:
    Sep 9, 2012
    Posts:
    33
    A version of the system was released for 5.6 while it was in late beta. Do the 5.6 releases available not function correctly? If not, it may be a simple matter of selecting and flagging the dll as editor use.
     
  45. Brad-Smithee

    Brad-Smithee

    Joined:
    Sep 9, 2012
    Posts:
    33
    I don't have a MacOS or Linux environment to test, but I'll have @JadenKorn (the platform maintainer) have a look.
     
  46. JadenKorn

    JadenKorn

    Joined:
    Sep 11, 2014
    Posts:
    5
    Odd. It does seem to work on my end properly. I did recompile the .dll using the 5.6.0f3 UnityEditor.dll and UnityEngine.dll base.

     
  47. Brad-Smithee

    Brad-Smithee

    Joined:
    Sep 9, 2012
    Posts:
    33
    Ah. Almost didn't see this. Please report your issue here. I'd likely need an example scene/project to test and resolve.
     
  48. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    Hey can you tell me how we can change highlighted text Color in the settings like we have the "Selection Color" in the UI's Input field???
    If you are able to do so please send me an Variant of "Darkness" unitypallet , please
     
  49. AbhimanyuAryan

    AbhimanyuAryan

    Joined:
    Apr 22, 2015
    Posts:
    32
    Can you improve these things. Select mode in opaque for all themes. And the text on assets...doesn't start from beginning. So its hard to identify the name of asset
     

    Attached Files:

  50. AbhimanyuAryan

    AbhimanyuAryan

    Joined:
    Apr 22, 2015
    Posts:
    32
    You should add this to asset store. So we can import while creating the new project