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.)
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.
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.
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.
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.
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.
Here is how you would go about implementing this in code:
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.
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:
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
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.
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
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.
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.
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?
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.
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.
Every time AssetIcons draws aScriptableObject 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