Button image sprite

image

Hey,
The 9-slicing sprite image is taking from the center instead of the blue boarder meaning only a grey box is displayed, how would I fix this?

Hi,

Select one of the buttons and check the Image component. There are different modes/settings.

In rare cases, the components do not update properly. In that case, select a different mode in the Image component and set it back to “Sliced”.

Hey, I attempted trying to select the different modes and trying to reset the object, but I still have the same issue. When I change the way the sprite is sliced for example not slicing the right hand side, it displays on the button. But when I 9-slice it, for some reason it insists on using the middle of the slicing which just gives the grey rectangle.

Try to make one of the buttons higher to see if the border appears.

Also check your game in the game window. When zooming out in the scene window, details might get missing in the scene window, which is not a problem as long as the details are still visible in the game window.

Could you also share a screenshot of the AnswerButtons and the Question Canvas? I’m mainly interested in their respective Inspector, so make sure that all components and their settings can be seen.

I suspect that the issue might be caused by the layout group. Disable one of the buttons for testing purposes. Do the three buttons become larger?


No details were displayed, I moved my button outside of the canvas as well and it was completely blank as the button images are transparent.

When I disabled one of the buttons, none got bigger, but the other 3 moved positions to still be equally spaced.

I remade the code from scratch and it ending up working fine…

Good job! :slight_smile:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms