Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Advanced Editor Styles Viewer... (FREE)

Discussion in 'Assets and Asset Store' started by slkjdfv, Dec 6, 2014.

  1. slkjdfv

    slkjdfv

    Joined:
    Oct 23, 2010
    Posts:
    435
    Working on a custom editor for your scripts? Want to spice up the look but don't know the built-in custom editor styles? Well now you can easily find the style you want and copy it by just clicking it (Pics below). Another neat feature is that it doesn't use GUILayout to display the items as this can cause issues when viewing some items causing them to squish or stretch and look terrible. It auto calculates the default size of the original image and adjusts it's size accordingly.

    Newest Features Added 12/9/14
    -Can now view both the Game and Inspector skins
    -Loads all GUI Skins in project folder so you can view them
    -Moved the search parameters button to the search bar (Click the magnifying glass)
    -Options now shows what features are selected (Showing text, if an items is disabled or not.)
    -Now shows all styles of a GUISkin not just the custom styles

    Features Added 12/8/14
    -Added option to enable or disable the items GUI
    -Added a color option that allows you to change an items background or content color
    -Added a text feature the item will re-size in relation to the text size
    -Created an "Options" menu to clean up the UI

    Features :
    -Clean looking GUI
    -Search feature
    -Click the "Copy" button to copy it to your clipboard (it adds the quotes so you don't have to)
    -Shows both the non-pro and pro-version of the item (Need pro to see pro-version)
    -Dockable
    -Full Source
    -Custom searches (StartsWith, EndsWith, Contains)
    -All forms of each item (clicking the item triggers it on or off)

    Working on :
    -Create code snippets that you can paste in then fill in the blanks...
    (Example of pasted code : if(GUI.Button(new Rect(0,0,0,0),"Insert Content Here","ButtonRight")){}
    will support js and c#)

    -As I think of them...

    Pics:



     

    Attached Files:

    Last edited: Dec 9, 2014
  2. slkjdfv

    slkjdfv

    Joined:
    Oct 23, 2010
    Posts:
    435
    Update...

    -Added custom searches
    -Added a toggle to each item so you can see its on off state
    -Added a copy button instead of using the item to copy(This was because of the toggle feature)
    -Adjusted the UI a little.
     
    shkar-noori likes this.
  3. shkar-noori

    shkar-noori

    Joined:
    Jun 10, 2013
    Posts:
    833
    thanks for sharing this, i will check it out now
     
  4. Cogent

    Cogent

    Joined:
    May 14, 2013
    Posts:
    356
    Sounds useful. ty

    *downloads*

    Happy Holidays

    :cool:
     
    shkar-noori likes this.
  5. slkjdfv

    slkjdfv

    Joined:
    Oct 23, 2010
    Posts:
    435
    New features added in... :D
    -Added option to enable or disable the items GUI
    -Added a color option that allows you to change an items background or content color
    -Added a text feature the item will re-size in relation to the text size
    -Created an "Options" menu to clean up the UI

     

    Attached Files:

    shkar-noori likes this.
  6. slkjdfv

    slkjdfv

    Joined:
    Oct 23, 2010
    Posts:
    435
    Newest Features Added 12/9/14
    -Can now view both the Game and Inspector skins
    -Loads all GUI Skins in project folder so you can view them
    -Moved the search parameters button to the search bar (Click the magnifying glass)
    -Options now shows what features are selected (Showing text, if an items is disabled or not.)
    -Now shows all styles of a GUISkin not just the custom styles



     

    Attached Files:

    rorydriscoll and shkar-noori like this.
  7. slkjdfv

    slkjdfv

    Joined:
    Oct 23, 2010
    Posts:
    435
    Any one else find this useful?
     
    chadiik likes this.
  8. liyubin724

    liyubin724

    Joined:
    Aug 24, 2012
    Posts:
    1
    It help me a lot.Thanks for share it.
     
  9. keht

    keht

    Joined:
    Oct 4, 2014
    Posts:
    6
    Me too, thank you!
     
  10. Dennin-Dalke

    Dennin-Dalke

    Joined:
    Aug 10, 2014
    Posts:
    25
    Your scripting was throwing errors:

    Code (CSharp):
    1. ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    2. Parameter name: index
    3. System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <f2e6809acb14476a81f399aeb800f8f2>:0)
    4. System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <f2e6809acb14476a81f399aeb800f8f2>:0)
    5. System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <f2e6809acb14476a81f399aeb800f8f2>:0)
    6. EditorStyleViewer.OnGUI () (at ...
    Every time I reload any script, so I've changed it a bit to prevent that.
     

    Attached Files:

  11. alternativevisual

    alternativevisual

    Joined:
    Apr 16, 2015
    Posts:
    75
    I've made my own, much better version https://github.com/Neonagee/GUIStylesViewer

    - No lags with optimized scrollview
    - Save to Texture feature
    - Search for state names
    - Uses GUILayout instead of GUI
    - Better design with some new options

    It's much more useful for me now, and i hope for you as well =)
     
    Last edited: Oct 15, 2019
  12. Deleted User

    Deleted User

    Guest

    I added your GUIStylesViewer in my project but it doesn't load the asset "GUIStylesViewerIcon":
    It throw IndexOutOfRangeException.

    Code (CSharp):
    1. //Line 102
    2.     public static void OpenWindow()
    3.     {
    4.         window = GetWindow<GUIStylesViewer>();
    5.         string iconGUID = AssetDatabase.FindAssets("GUIStylesViewerIcon")[0];
    6.         Texture2D icon = AssetDatabase.LoadAssetAtPath<Texture2D>(AssetDatabase.GUIDToAssetPath(iconGUID));
    7.         window.titleContent = new GUIContent("GUIStyles Viewer", icon);
    8.     }
    So I wanted to ask you, which version of unity is this toold made for?
    I'm using unity 2019.2.2
    Or there's something else I need to make it work?
     
  13. alternativevisual

    alternativevisual

    Joined:
    Apr 16, 2015
    Posts:
    75
    Then it means it didn't found it. Are you imported only a script into project? If so, just import 2 missing textures from repository, or delete lines that causes errors.
     
  14. jq911

    jq911

    Joined:
    Jun 11, 2015
    Posts:
    3
    It helps a lot, thx.
     
  15. slkjdfv

    slkjdfv

    Joined:
    Oct 23, 2010
    Posts:
    435
    I still use this today, glad to hear people are getting use out of it!