Quantcast
Channel: Questions in topic: "icon"
Viewing all articles
Browse latest Browse all 271

Custom script icon by code inside assembly

$
0
0
I'm trying to change the icon shown on inspector/project view for custom types derived of MonoBehaviour. I have those types inside a compiled assembly (i.e. MyAssembly.MyScript). I've managed to load a custom icon by placing it at the following path `Gizmos/MyScript Icon.png`. But I don't want the icons to be there, as I'm embedding them into the assembly (they are base64'd on code, so I load them at recompilation). Any hint on how to load them properly? Or even an explanation on how Unity load those? I've been digging the assemblies for a while and the closest I've got is `AssetPreview.GetMiniThumbnail (obj)`, which is defined on unmanaged-code land (i.e. C++), and only gives me the image but doesn't let me change it.

Viewing all articles
Browse latest Browse all 271

Trending Articles