It seems this would be the thing to override to generate a custom thumbnail… is there any way to do this?
Changing the icon for a script derived from ScriptableObject is easy through the project view, but that icon doesn’t carry through to any instances of said ScriptableObject in the project view…
In it, add a texture - 128x128 works well - named “AudioItem Icon.png”.
Yes, it’s a normal space between “AudioItem” - name of your class - and “Icon”.
Awesome. wasn’t aware of this. However it doesn’t work when you create a subfolder in the Gizmo folder. Not sure if thats needed, but i assume when you import other assets and if they use a Gizmo folder, the system might break.
If you are referring to including the Gizmos Folder Asset in a unitypackage, then this depends on your Unity version. With newer versions of Unity you simply get a warning in the asset importer. With some versions of Unity (e.g. 5.1, 5.2) you get a bunch of ugly warnings/errors in the console. I’ve posted more about this in relation to the official AssetStoreTools here.
If you are referring to the fact that someone might have a class named Tile in their project with a custom icon and another asset package may also have a Tile class, albeit in a different namespace, then yes: one icon would overwrite the other and all Tile assets would share an icon. This entire “system” is very likely extremely legacy and probably hasn’t been looked at in quite a while.
Anyone know how to make our icons not look pixelated? Mine look great in the Gizmos folder, but crappy when attached to the actual files in another folder in the Project View.
Just a note to the solution that @LightStriker_1 provided: The gizmos folder must be “Assets/Gizmos”.
It would be very useful if this wasn’t required, and the Gizmos folder could be placed anywhere inside the project… It would make it easier to provide custom icons for ScriptableObjects in asset packages, and this would make it easier to provide more professional looking assets.
Assuming that your icon images are large enough to contain good detail, even when font size is maximized on a retina display (we use 256x256), you should ensure the following settings in the icon files’ Import Settings:
Texture Type: GUI (Editor \ Legacy)
Filter Mode: Point
I agree that this would be better and easier to support. I should also mention that it doesn’t stop you from including this in your Asset packages (whether distributed directly or through the Asset Store using the Asset Store Tools). It is less than ideal, but it does work.
Actually, tested in 2017.2, assigning a custom icon on the scriptableObject script asset in the inspector will automatically assign the same icon on the asset created from this scriptable object…
I always wanted to do it in my projects so I set aside some time and finally produced the asset
It allows for Dynamic ScriptableObject icons with a single attribute! If you love ScriptableObjects, then you will love this asset
All of the above solutions, per script icons and using Gizmos only allows for one icon for every ScriptableObject, but my asset sources the icon from the ScriptableObject’s data.
@raphick My asset allows for sprites to be used and rendered directly into the project window, without the need for creating Texture2Ds and caching them in the backend for each sprite. It also is completely independent of editors and is optimized for a lot of assets.
I do find that using the RenderStaticPreview is capable of doing some of the things my asset can do - which is great
I think that everyone should be able to adopt this into their workflow, it really encourages the use of ScriptableObjects.
Quick question - I could never get RenderStaticPreview to work - does it work with the Object Selector window?