Slice/Sprite 9 in Game Objects

I would like to have a the option to use slice 9 on my sprites when they are in game objects, not only in guis.


The same. Have a problem in game object because can’t scale this properly.

1 Like

We are blending gui and go more and more with recent additions such as spine in gui and the upcoming release of text components in game objects. At some point we probably need to ask ourselves what the point is to have both go and gui… Anyway, could this be solved by moving the thing you need to scale to a gui scene instead or does it really have to be a sprite in a game object?


not a big problem actually just thought to redesign some stuff.

I’m thinking of opening a ticket for this, but could you @nicloay and @Mattias_Hedberg provide me with a couple of use-cases where 9-slicing is needed for sprites and where it isn’t feasible to do it in gui space instead?


In my game i have a board which could have a differed size 5x5, 3x3 and i have top down view. so i thought to use slice9 sprite to show this board. on side of slice9 sprite i planed to show thickens of the board. Also i have tiles with round corners and slice 9 could save space for tiles. Otherwise i need to include this huge sprite to the atlas (for retina display)

Maybe give access to mesh is more easy so we can create some sort of plugins to make slice9 or tiling?

It is for when you want to have signs and such in worldspace. I can’t think of a example on the spot, there is always some kind of work around that can be done (even if the work around is using the whole texture). I will update here when I have a more concrete example.

Sorry for bringing this up again, but I think it’s a very good request and definitely not something that should be available for GUI’s only.

Unity provides a pretty good use case example.

Basically it’s for level design or anything within the game world that would otherwise require a lot of copy, pasting, repositioning and scaling. It would allow for faster level design.

Aside from that, GUI is something you interact with through some device, ie. a mouse, keyboard, touch etc. to get response from a menu’s or HUD. The game world is usually not part of that.


Yes, that is a very nice feature. It’s different from slice9 though which only scales the (up to) 9 images. What the video shows includes repetition/tiling as well.


Oh I see, I thought it did something similar but only for GUI, having looked at the manual now and tried it in the editor, I can see that it’s different. Something like above would be awesome though :slight_smile:


Aye, the included video looks pretty damn cool, and it could be a really useful. Almost the same thing could be achieved using tilemaps. Could it be done with a shader?


Any update on whether the Slice 9 feature will ever be added to the regular game object Sprite? I’m coming from Flash/Starling games where we would shrink our game assets whenever possible and use them as slice 9 textures. For example: buttons, elements of a book (cover of a book, pages), the rear side of playing cards (the image of the card-face was a blank slice-9, and we would add a secondary sprite to it to complete the appearance of the playing card)

Basically, we would do everything we could to reduce the size of our images so that we could pack our texture atlases with as many art assets as possible. Here’s a few examples…

It is not something we have imminently planned for the editor and engine, but it would definitely be an improvement. As a workaround can you use gui nodes instead?

+1 for slice 9 for Sprites. Would be very handy to avoid huge bitmaps for backgrounds and things like road surfaces in a top down racer.


My vote here too.



Just a reminder that there is issue for this wonderful feature (I write because there is no link in this topic and this is a very useful feature)


Another cool example for this feature:


I’d like to add my vote for this feature as well. I tried using the GUI node version attached to a Game Object, but it seems that adjusting the coordinates on the Game Object doesn’t move the 9-slice sprite as well.

Thanks. Did you add your vote in the github issue? (I.e. adding a like to the issue)