2D Toolkit Forum

2D Toolkit => Support => Topic started by: kenglou.lee on February 09, 2015, 02:44:00 am

Title: Show 2d Sprite Thumnails in Editor
Post by: kenglou.lee on February 09, 2015, 02:44:00 am
Is there any way to show the thumnails indicate the sprite in Unity3d Editor Windows/Inspector?
Thanks.
Title: Re: Show 2d Sprite Thumnails in Editor
Post by: unikronsoftware on February 09, 2015, 10:29:16 am
The thumbnails are shown in the inspector when you select the sprite, what are you looking for specifically?
Title: Re: Show 2d Sprite Thumnails in Editor
Post by: kenglou.lee on February 10, 2015, 11:01:19 am
I'm thinking to do an editor that show's a sprite prefab i selected with image for the sprite prefab with sprite Id.
Title: Re: Show 2d Sprite Thumnails in Editor
Post by: unikronsoftware on February 10, 2015, 11:31:11 am
You can see that in the inspector near the sprite selector, not in the preview window though. The preview window requires the mesh to be generated and that can't happen with prefabs.
Title: Re: Show 2d Sprite Thumnails in Editor
Post by: kenglou.lee on February 12, 2015, 07:03:41 am
oh i see. so it is not possible to get the image if I'm trying to create a level editor with all the sprite prefab in right?
If that's the case I think i gotcha. Thank you Admin.
Title: Re: Show 2d Sprite Thumnails in Editor
Post by: unikronsoftware on February 12, 2015, 09:22:10 am
It IS possible but you'll have to dig through the code base. Look for tk2dSpriteGuiUtility.SpriteSelector