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. Dismiss Notice

AssetIcons - Dynamic ScriptableObject Icons and more

Discussion in 'Assets and Asset Store' started by Fydar, Oct 15, 2017.

  1. Fydar

    Fydar

    Joined:
    Feb 23, 2014
    Posts:
    70
    AssetIcons



    Organise your projects and manage your assets with a single attribute.

    Code (CSharp):
    1. [CreateAssetMenu]
    2. public class ItemInformation : ScriptableObject
    3. {
    4.     [AssetIcon]
    5.     public Sprite ItemIcon;
    6. }



    • Dynamic icons for ScriptableObjects
    • Customize icons with attribute-defined styles
    • Configurable
    • Easy to use
    • Custom icons per file extension
    • Support for Unity's Collaborate overlay
    • Support for Unity's Version Control overlay






    screenshot-1_1920x1080.png screenshot-2_1920x1080.png screenshot-3_1920x1080.png screenshot-4_1920x1080.png screenshot-5_1920x1080.png


    You can follow development on the asset on the product page on GitHub: https://github.com/Fydar/AssetIcons. Here is where I collect all of your ideas and allow the community to track the progress of AssetIcons.

    Feel free to contribute your ideas on the public issue tracker. You can make feature requests, ask a question or report a bug here.




    You can find my product page here.

    For support or enquiries, please contact me at dev.anthonymarmont@gmail.com.
     
    Last edited: Nov 26, 2019
    GamerPET likes this.
  2. Fydar

    Fydar

    Joined:
    Feb 23, 2014
    Posts:
    70
    An update on the custom icons dependant on extension type, coming in AssetIcons 1.0.3.

    Docs Demo.png
     
  3. GamerPET

    GamerPET

    Joined:
    Dec 25, 2013
    Posts:
    370
    This looks pretty useful!
    I'm curious what's the compatibility with Rainbow Folders?
     
  4. Fydar

    Fydar

    Joined:
    Feb 23, 2014
    Posts:
    70
    @GamerPET Though I haven't tested it with the later versions, I'm confident that it is compatible with Rainbow Folders.

    Rainbow Folders only draws on folders, so the two assets should have perfect compatibility. In fact - this asset was inspired by Rainbow Folders.
     
  5. Fydar

    Fydar

    Joined:
    Feb 23, 2014
    Posts:
    70
    Module editor and system completed, allows you to create and define your own drawing rules.

    Installed Modules.png

    Module Editor.png

    Modules in Action.png
     
  6. Fydar

    Fydar

    Joined:
    Feb 23, 2014
    Posts:
    70
    AssetIcons 1.0.3 pending review - should be released shortly.

    Changelog:
    - Added the Module system
    - Add the module Extension Type Module which allows you to draw custom icons depending on the file extension (.txt, .pdf, e.t.c)
    - Recreated promotional material
     
  7. Fydar

    Fydar

    Joined:
    Feb 23, 2014
    Posts:
    70
    Updated the forum page, added a Showcase Video along with new custom headers and the new logo.
     
  8. Fydar

    Fydar

    Joined:
    Feb 23, 2014
    Posts:
    70
    WIP Update - AssetIcons 1.1-b1:

    Adding Support for Multiple Images!
    Now multiple images can be combined together to form more meaningful item icons.

    You can now show item rarity (using boarders like popular MMO and RPG games do) right in the Project Window!
    (Apologies for the Victorian pattern border, of course, this can be customized.)

    Borders Prototype.PNG

    And CSS Styling!
    Using a well-established format, you can now customize your icons style using CSS.

    I have produced full documentation and CSS helpers for the CSS properties available. CSS values are compiled and optimized, whilst remaining 100% dynamic, with a math evaluation system for complex shapes and sizes.

    CSS Code.PNG

    New Uses Ahead
    These new features can be compiled to create meaningful asset icons, which I hope will optimize your project's workflow.

    I know one thing I will be using these for in AssetIcons itself. Currently, the ExtensionTypeModules draw the same icon as the .cs and .pdf files they override. Now with CSS and multiple image support, I can put a small icon in the bottom right indicating that this asset is an ExtensionTypeModule. Below is a teaser for whats to come.

    CSS Prototype.PNG
     
  9. Fydar

    Fydar

    Joined:
    Feb 23, 2014
    Posts:
    70
  10. Fydar

    Fydar

    Joined:
    Feb 23, 2014
    Posts:
    70
    WIP Update - AssetIcons 1.1-b2:

    On a quick side note before I discuss more. AssetIcons development has gone a lot slower than I would have liked. I believe it's due to a general lack of motivation from a lot of people criticising the actual place for AssetIcons in Unity. However, I haven't stopped using AssetIcons in everything I have produced. This is evidence enough for me that AssetIcons is highly configurable and a very powerful tool.

    I aim to redo the documentation for AssetIcons, however this may take some time due to me creating my own documentation solution.

    Prefab Rendering, in multiple styles!

    Configurable via CSS, you can render our your prefabs as asset icons.

    0c48fae9b6e6600bf7d7aef0ba865198.png

    GUIStyle Preview

    I thought that giving people the option to render GUIStyles as an icon would be a nice touch. Though it's rare that project have to use many of these, I still believe that someone out there will find a use for it.

    a23a537373e692a410a57eedf7efbc20.png

    Rendering of Colours and Text

    Something I found useful whilst working on a couple of projects of mine. I used it to create dynamic stat ScriptableObject icons. This was especially useful in the Object Selector window.

    f95be1f8f8fd7df0a1120cb0feb39267.png

    Here is how you would go about implementing this in code:

    d339752a2408ce282eeeeac1e565bb90.png

    All of these features from AssetIcons 1.1 will hopefully be released in late August. As stated previously, I would like to have a perfect documentation system so I can quickly develop AssetIcons into the future.

    Thanks for all of your feedback on the Asset Store - I hope I can continue to support this product and produce the go-to tool for Unity.
     
    Last edited: Jul 15, 2018
  11. TommySKD

    TommySKD

    Joined:
    Jul 23, 2014
    Posts:
    25
    Interesting asset I certainly find it very cool, and I see you considered supporting prefabs, off the top of my head im thinking that would be very nice for a few reasons:

    1. Unity renders assets preview poorly sometimes (bad lighting, bad zoom..) if I could override them with [AssetIcon] directly with a good sprite like the character head or something would be nicer

    2. I use ScriptableObjects sometimes AssetIcons is already great for that, but a lot of times I use big components on prefabs (Character, Ball, Particle..) instead and yea it is sad because I get zero info on them from their icon.
    Custom sprite and your new color and text features all seem great options to fix that.

    3. Unity decided "hey lets stop showing asset previews in list view!", and, uh.. they didn't ask me.. I think it'd still be nice to see the previews even if they're very tiny (screenshots).
    That one seems really fun and easy to do! Don't even need to open the prefab for AssetPreview.GetAssetPreview(prefab);
    once you checked .prefab extension

    4. they don't distinguish prefab variants (new prefab stuff from 2018.3) very well. (that's a shame because they're great) With your new style thing right above could add a colorful V in the corner or something instead of their stuff it would be more noticeable, pretty, and even work ontop of a pretty custom asseticon.

    2019-03-11_23h26_42.png 2019-03-11_23h26_47.png

    Keep up the great work!
     
    Last edited: Mar 11, 2019
  12. Fydar

    Fydar

    Joined:
    Feb 23, 2014
    Posts:
    70
    Thanks for the support :)

    Before I roll out my next update I need to fix a compatibility issue with Unity Collab. Currently there is a 50% chance whenever you recompile the code that AssetIcons renders below the collab stuff or doesn't, which is a shame.

    I'm looking at trying to reinvoke the delegate because annoyingly Unity uses the same delegate for publically exposed APIs and their own internal usage. That, and it's a delegate! We have no control over the order that stuff invokes in that.

    Anyway, I've already done quite a lot of reflection to subscribe to the delegate on all views, a little more won't hurt :)

    The great thing about AssetIcons is you will be able style the prefabs that get rendered for a ScriptableObject using css; example: [AssetIcon("BackgroundColour: #333; MaxSize: 256px;")]

    I hope to roll this update out in April - but this Collab issue is a must-fix.
     
    mangax likes this.
  13. mangax

    mangax

    Joined:
    Jul 17, 2013
    Posts:
    333
    it's nice to see you again!

    i am getting errors since i dunno which version, but i kept ignoring it in hope that an update is coming.. it took a while!
    when we expect the update to roll out?
     
  14. Fydar

    Fydar

    Joined:
    Feb 23, 2014
    Posts:
    70
    I have recently have been able to accomplish 100% drawing below the Unity Collab icon!

    I'm currently writing docs for the update (well I'm hoping to improve an auto docs generation tool I'm working on) but I'll DM you a .unitypackage later today (when I get home) with the fixes.

    RazorLight currently has a bug where it won't render large documents properly which is blocking my progress on auto--generated docs. The author said they fixed it but they haven't done a NuGet release.
     
  15. Fydar

    Fydar

    Joined:
    Feb 23, 2014
    Posts:
    70
    AssetIcons 2.0 is released!

    I've moved issue tracking and community discussion to a GitHub page (https://github.com/Fydar/AssetIcons) :)

    Thanks for the support and the ideas on this thread - it's helped me get over the hill and re-focus my attention.

    ^^ Never went for the RazorLight fix; I ended up using a full MVC application to generate my documentation. Oh well :)
     
  16. iconnary

    iconnary

    Joined:
    Feb 9, 2020
    Posts:
    6
    Hi Fydar, I've written a script that generates ScriptableObjects from external resource files, and assigns each an icon using AssetIcons. Immediately after generation the icons show up correctly, but once I reload the project or hit Play, all the icons disappear.

    I suspect that this has something to do with how I'm persisting the Sprite assets. They are definitely being persisted -- I can see them in the Project window. But my ScriptableObjects lose their association with them after I do anything else within Unity.

    Thanks!
     
  17. Fydar

    Fydar

    Joined:
    Feb 23, 2014
    Posts:
    70
    Hiya @iconnary!

    Every time AssetIcons draws a ScriptableObject in the project window it will fetch the ScriptableObject from the AssetDatabase and fetch the value of the field. If all goes to plan, whatever is in that field is what AssetIcons will render.

    I suspect somehow Unity isn't serializing your reference to the sprite atlas. Depending on how your editor scripts are setting the values of the ScriptableObjects, you might need to use EditorUtility.SetDirty(scriptableObject) to mark the ScriptableObject as dirty. You should do this after you have modified the ScriptableObject. This will then cause Unity to save all changes that you have made to the ScriptableObject to disk so that when your project reloads it keeps your references :)

    It doesn't sound like an issue with AssetIcons, but I do love ScriptableObjects and I'd be more than happy to dive into it :)

    Thanks,
    Anthony.

    I have an AssetIcons public issue tracker hosted on GitHub here: https://github.com/Fydar/AssetIcons
    And you can email me on my support link at dev.anthonymarmont@gmail.com.
     
    Last edited: Jul 21, 2021