Author Topic: [solved]Transparent (invisible) widget?  (Read 2368 times)

scheissmann

  • Guest
[solved]Transparent (invisible) widget?
« on: March 31, 2013, 07:26:25 PM »
Hi everyone! What I'm trying to accomplish is to make a widget that's simply a square with a collision box, and a group of these will sit on top of a grid and when you click the grid, the collision box around these widgets will register the click and do things.

I tried to do it with sprite, but I don't know how to make it invisible. If I create a transparent png image with photoshop and then create a font with it as texture, the texture won't show up under "Sprite to create" drop down list in the Create Widget window.

How should I go about making these invisible widgets?
« Last Edit: April 02, 2013, 10:23:16 AM by Nicki »

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Transparent (invisible) widget?
« Reply #1 on: March 31, 2013, 08:39:55 PM »
Just make an empty GameObject with a collider attached. Set the localScale of the transform to what size you want the box to be in pixels, like you would a widget, and set the box collider to 1,1,0. Attach components to catch OnClick etc. events.

scheissmann

  • Guest
Re: Transparent (invisible) widget?
« Reply #2 on: April 01, 2013, 01:20:12 AM »
thank you that makes sense :)