Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Enter the 2020.2 Beta Sweepstakes for a chance to win an Oculus Quest 2.
    Dismiss Notice

Editor skinning thread

Discussion in '2019.3 Beta' started by pointcache, Jul 16, 2019.

  1. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    2,800
    Wow thats great!
     
  2. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,048
    Any update on this?
     
  3. xeleh

    xeleh

    Joined:
    Jul 22, 2016
    Posts:
    300
    Sorry for the delay. I found a couple of issues and I want to fix them before sharing the repo.
     
    MstislavPavlov likes this.
  4. xeleh

    xeleh

    Joined:
    Jul 22, 2016
    Posts:
    300
    FabioMen10, Neonage, Idlee and 5 others like this.
  5. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    2,800
    Thanks ! and hope things will get better for you soon in spain!
     
    Peter77 and xeleh like this.
  6. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,844
    So this does not work in any of the actual LTS releases?
     
  7. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    488
    Probably not even possible before 2019.3. Was trying the icon switch code in 2019.2 but it was crashing editor.
     
  8. Idlee

    Idlee

    Joined:
    Mar 13, 2018
    Posts:
    1
  9. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,048
    xeleh likes this.
  10. starfoxy

    starfoxy

    Joined:
    Apr 24, 2016
    Posts:
    83
    This is excellent! Nice work @xeleh !
     
  11. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    5,239
  12. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    488
    Drama inc...

    I guess we will be stuck in 2019.3.whatever version that enhancer works.

    I hope that their fix won't make theming impossible but for ex. make dark styles/icons inaccessible - that way inverting technique could still be used.
     
    Last edited: May 19, 2020
  13. RealMTG

    RealMTG

    Joined:
    Jul 27, 2013
    Posts:
    357
    Just tested the enhancer in the newest 2020.1 beta and it still works. There are some issues with the package manager and other windows, but most of it is in the dark theme. I don't know if they are present in previous versions because I didn't check.
    The actual message in the release notes also says "Ensured that we do not save the isDarkTheme in an asignable variable to ensure users cannot bypass entitlement." so it seems more like they had an actual bool somewhere in the code you could change than actually "fixing" the enhancer.
    But still, something to keep an eye on. This whole debate is getting ridiculous if you ask me. Pretty much every modern program, free or not, has a dark theme at this point.
     
    Rewaken, TextusGames and Peter77 like this.
  14. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    580
    If I remember correctly, I think that's what the hex editing (which is/was against the EULA because you modified the binary) was actually doing.
     
  15. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    488
    "Fixed in 2020.1" could be next version not currently available.
     
  16. RealMTG

    RealMTG

    Joined:
    Jul 27, 2013
    Posts:
    357
    That's true, hence why we should keep an eye on it. But the case was referenced in the release notes for the latest beta.
     
  17. xeleh

    xeleh

    Joined:
    Jul 22, 2016
    Posts:
    300
    Yes, I found that starting in Unity 2019.3.8 the code to apply changes to the light theme was no longer working and while I investigated it I was lucky to also find that someone at Unity had opened "a door" to make it possible again (with a little bit of Reflection, of course). I guess their "fix" is basically removing that door.
     
    Rewaken, Peter77 and RealMTG like this.
  18. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    16,224
    Yet two months later there is now a constraint in place to prevent it from functioning. Can you elaborate on this? Were you told to close it up? Or is it simply a result of internal changes?

    https://issuetracker.unity3d.com/issues/enhancer-package-bypasses-dark-theme-entitlement
     
  19. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    488
    No, my experiments also don't work anymore.

    I'll stick to 2019.3.14. Started learning Unreal as Dots netcode that I was waiting for is delayed for a year.
     
    Last edited: May 31, 2020
    TextusGames likes this.
  20. Lelepoop

    Lelepoop

    Joined:
    Nov 14, 2016
    Posts:
    131
    Let's make our own game engine at this point, starting with bgfx
     
  21. RealMTG

    RealMTG

    Joined:
    Jul 27, 2013
    Posts:
    357
    "I'm gonna go build my own game engine, with dark theme and networking!"
     
  22. benoitd_unity

    benoitd_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    226
    Which ones specifically? To my knowledge, no other change related to styling has been released.
     
    Kamyker likes this.
  23. xeleh

    xeleh

    Joined:
    Jul 22, 2016
    Posts:
    300
    Kamyker likes this.
  24. benoitd_unity

    benoitd_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    226
  25. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    488
    Edit this post completely:

    In 2019.3.7 and before I could do:
    https://github.com/kamyker/UnityDar...dfea823c96ca82425/StyleSheetController.cs#L35
    Code (CSharp):
    1.             var serialized = new SerializedObject(Sheet);
    2.             serialized.Update();
    3.             var colors = serialized.FindProperty("colors");
    4.             if ( colors != null )
    5.             {
    6.                 for ( int i = 0; i < colors.arraySize; i++ )
    7.                 {
    8.                     var property = colors.GetArrayElementAtIndex(i);
    9.                     //Debug.Log( $"name: {property.name} color: {property.colorValue}" );
    10.                     property.colorValue = Utils.InvertColor( property.colorValue );
    11.                 }
    12.  
    13.                 serialized.ApplyModifiedProperties();
    14.             }
    It doesn't work in 2019.3.8.
     
    Last edited: Jun 3, 2020
  26. Magasenakwa

    Magasenakwa

    Joined:
    Oct 13, 2018
    Posts:
    72
    you can always start here and save yourself some grunt work: https://stride3d.net/
    ;)
     
  27. hprzteam

    hprzteam

    Joined:
    Oct 23, 2017
    Posts:
    2
  28. Lelepoop

    Lelepoop

    Joined:
    Nov 14, 2016
    Posts:
    131
  29. starfoxy

    starfoxy

    Joined:
    Apr 24, 2016
    Posts:
    83
    Any chance themes work with 2019.4 LTS? I don't even care about the dark theme as much but being able to skin Unity like Blender with multiple theme options would be awesome.
     
    Lelepoop likes this.
  30. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    5,457
    Nope, we aren't there yet.
     
  31. xeleh

    xeleh

    Joined:
    Jul 22, 2016
    Posts:
    300
    You are missing the part of the diff where you are caching the style catalog preventing us from applying any changes to the light stylesheet. It seems like the change was motivated by this bug (https://forum.unity.com/threads/edi...igh-assembly-reload-cost.766952/#post-5279616) but honestly I am not sure. It would be nice if you could confirm this so everybody here know there was a good reason for the change.
     
  32. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    488
    Thanks for the tip, that was easy to fix:
    Code (CSharp):
    1. var refresh = typeof( UnityEditor.Experimental.EditorResources )
    2.     .GetField( "s_RefreshGlobalStyleCatalog", BindingFlags.NonPublic | BindingFlags.Static );
    3. refresh.SetValue( null, true );

    My way works again :D, 2019.4:
     
  33. Triunvirato

    Triunvirato

    Joined:
    Mar 9, 2019
    Posts:
    2

    Nice job my friend :D
     
  34. starfoxy

    starfoxy

    Joined:
    Apr 24, 2016
    Posts:
    83
    @xeleh will you be updating your github with these changes to enable the theme again? I really liked your implementation.
     
    Last edited: Jun 12, 2020
    khaled24 and Thorgrem like this.
  35. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    488
    Unity no blue light edition:


    Works a bit faster than my prev version (from 30sec to 15sec)
     
    TextusGames and Peter77 like this.
  36. Lelepoop

    Lelepoop

    Joined:
    Nov 14, 2016
    Posts:
    131
    @Kamyker are you able to customize the line colors in between the panels, or is that the background unchanged from the light theme? Also wondering if you have plans to standardize your own api to make it more "agnostic"
     
  37. starfoxy

    starfoxy

    Joined:
    Apr 24, 2016
    Posts:
    83
    @Kamyker nice work!

    Lots of potential here. It's inspiring to look at some of the creativity that people have with Blender themes. It would be cool for Unity users to be able to do the same.












    We could set up a Unity theme repository. :)
     
    Last edited: Jun 12, 2020
  38. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    488
    This ugliest skin possible in Unity ever presents how much you can customize it:

    Gradient:


    A lot more possible but this one simply adds (or removes) color based on brightness of default skin.

    Updated: https://github.com/kamyker/UnityDarkenThemer

    Probably, going to see how long this keeps working. Don't want to waste too much time in case Unity update will break it. For now I make it work just enough to be able to work on my game.
     
  39. starfoxy

    starfoxy

    Joined:
    Apr 24, 2016
    Posts:
    83
    @Kamyker That's a good reference point to see what's possible. If this will be confirmed to stay and keep working I would be happy to design some themes to contribute in my free time.
     
  40. Lelepoop

    Lelepoop

    Joined:
    Nov 14, 2016
    Posts:
    131
    Yeah thats the point of making the api "agnostic", so that this exact kind of thing is a non-issue.
     
  41. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    488
    I see but it's still an issue as it defeats main purpose of this plugin. Maybe if it could also work in runtime for built games I'd consider it worth doing.
     
  42. xeleh

    xeleh

    Joined:
    Jul 22, 2016
    Posts:
    300
    Unfortunately the code posted by @Kamyker does not work for my case.
     
  43. LukeDJ

    LukeDJ

    Joined:
    Oct 2, 2017
    Posts:
    7
    PROE_, JamesArndt and Lars-Steenhoff like this.
  44. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    2,800
    Nice!
     
    LukeDJ likes this.
  45. TextusGames

    TextusGames

    Joined:
    Dec 8, 2016
    Posts:
    382
    Hura. 2020 was passing.
    By the way why menu bar is still bright and white?
     
unityunity