Class Icons

Hey,

Just wondering if there is a way in C++ to create a thumbnail for my class, so if i were to search for them i can see a thumbnail?

Thanks

Hi there!

Currently the only way to achieve this is to make a thumbnail and icon for your class inside Engine/Content/Editor/Slate/Icons/AssetIcons/ with the name of your class (_16x and _64x).

You’d then need to add your class name to the AssetTypes[] array inside FSlateEditorStyle::FStyle::SetupClassIconsAndThumbnails() found in Engine\Source\Editor\EditorStyle\Private\SlateEditorStyle.cpp.

Once you’ve done that you should see a custom icon. Unfortunately it’s not a particularly elegant solution, but perhaps we can streamline it in future.

Ahh okay, thanks for letting me know :slight_smile:

I’m wondering if there’s a better solution that doesn’t require modifying the engine code since this answer was posted. Thanks!

Hey there, you can, if you wish, create your own slate style set for your game/plugin editor which contains a style for “ClassIcon.MyClassName”, and register your style set with FClassIconFinder. This should allow you to define class icons in your plugin without changing any core engine code.

Also, of 4.13 you will no longer need to register your style set with the icon finder - that will happen automatically.

1 Like

Perfect! Many thanks.

To Clarify:

Icon - In editor billboard for actors.

Thumbnail - Content browser icon.

This confused me for a bit because I had set it up for icons until I stepped through and realized it was thumbnails I was after. I am posting this because OP was looking for thumbnails so hopefully this doesn’t catch you up either! =D