#ui problem

1 messages · Page 1 of 1 (latest)

raw salmon
#

The button is off the bottom left corner of the screen.

#

This is a common error. The canvas is in "Screen Space - Overlay" mode, so it's drawn directly onto your screen.

rugged oracle
#

yikes

raw salmon
#

The canvas is positioned and sized in the world so that one unit on the canvas is one unit in the world

#

It doesn't matter where the camera is "looking" at the canvas objects

#

Click on the Canvas and hit F to focus your view on it

#

your camera will zoom way out

rugged oracle
#

OH

raw salmon
#

The button is probably really tiny right now

rugged oracle
#

it was yeah

raw salmon
#

Select MenuButton and set up its RectTransform like this

rugged oracle
#

but the camera didnt move

raw salmon
#

I mean the scene view camera -- the thing you've viewing the scene with

rugged oracle
#

yeah

raw salmon
#

so put it back to 1, 1, 1

rugged oracle
#

it's still a tiny dot

#

but I can just resize it

raw salmon
#

also set its width to 160 and its height to 30

rugged oracle
#

and these???

raw salmon
#

The UI is drawn directly onto your screen

#

The Camera position is meaningless.

#

It doesn't matter where the Camera component's object is pointing or positioned

rugged oracle
#

either way, the hover detector works on this button

raw salmon
#

Okay, so I'm guessing you had another UI element that was blocking the button.

rugged oracle
#

so that is very strange, something must be interrupting it in my other scene

#

gonna have to crack on finding out what that could be then

#

thanks for the help

raw salmon
#

You should have a look at the UI docs

#

I mashed stuff together for a long time before actually reading and understanding the docs

#

which make it a lot easier to make a consistent UI...

rugged oracle
#

is it possible something in one of my other scripts is messing with it though? or you think it's more likely being 'physically' blocked

raw salmon
#

If the button isn't changing color, then nothing is receiving inputs at all

rugged oracle
#

I will yeah

#

this has been enlightening 🙂

rugged oracle
raw salmon
#

That implies it depends on the exact order objects were created in