Roger Hill
Roger Hill

Reputation: 4099

Hide and show button background in unity

I am trying to make transparent (legacy) buttons in unity. I want to be able to see the button text, but not see the background button image (aka the 'clickable' area). I am not asking about hiding/showing the button and the text completely.

I have tried disabling the button, removing the Target Graphic image, setting the alpha values to 0, but none of these seems to have any effect.

Do I need to just remove the button object and write some sort of script that hangs off a text object to detect clicks?

Addendum: Geode's suggestion works nicely. Either deleting or disabling the image component will solve this problem.

Upvotes: 0

Views: 340

Answers (1)

Geode
Geode

Reputation: 138

I think you've been looking in the wrong area, above your Button component there is an image component which handles the graphics part of your button. Disabling or removing that will remove the white background.

Here you can see the location

Upvotes: 1

Related Questions