I’m trying to create a game with a 2D user interface. It’s possible I might use some 3d-models but for now I’m trying to make it completely in 2D.
I’ve been trying to create buttons for my GUI that pass OnMouseOver events to my script. Since GUI.Buttons don’t seem to support OnMouseOver directly, I’ve been trying to create buttons using GuiTextures. This has created two problems for me:
-
GuiTextures keep changing their size when I resize my game viewport. How can I tell them not to scale with the window?
-
The measurement unit of GuiTexture seems to be in scale of 0-1 or % of viewport. However Gui.Buttons can be positioned measuring in pixels. How can I
I might be missing something vital, such as common sense. Please tell me right away if I’m going completely in the wrong direction.