Page 1 of 1

Menu panel problems

Posted: Thu Oct 24, 2019 9:08 am
by nicmar
Hey,
I've finally added a custom menu panel, but I'm having two problems:

1) I have the Menu panel assigned in the list and as the default in the Standard Dialogue UI. It's position is correct when I edit the game. But when I enter play mode, it's position Y jumps from 0 to 530, causing it to appear in the middle of the screen instead of at the bottom as I wanted. Do you know of any feature that would move the panel on start?

2) Another problem is that the first option is always selected, causing it to not highlight when I hover (since it's already highlighted). The button design I chose is a Color tint, and the image is a border, that outlines the button. The hover/highlight works on the other buttons. When I click on any of the other options, the border on option 1 blinks briefly. Not sure why

I tried "To last" under Button alignment, and it flipped the order of the buttons, but the top most one was still selected.
I guess this would be good if I'm playing with controls, but with mouse it feels weird.

Any idea on how to solve any of these? :)



Re: Menu panel problems

Posted: Thu Oct 24, 2019 9:13 am
by nicmar
This is what the debug view looks like for the first button. So it's <has Selection> is active. When I click/hold another button, this gets unchecked and checked again, hence the blinking of the color tint i guess.

So not a solution yet, but maybe this helps you somehow? :)

Image

Re: Menu panel problems

Posted: Thu Oct 24, 2019 9:39 am
by nicmar
I noticed I had disabled the "Input manager" component in the dialogue manager.
Enabling this kind of solved the input problem. The only problem is that in some cases it seems to think I'm using a keyboard (i press E to start the dialog) so the first option was selected anyways.

But I think this problem is mostly solved now. The Y position still is an issue though. I can always reset it to 0 after 1 second on start, but it feels hacky :)

Re: Menu panel problems

Posted: Thu Oct 24, 2019 9:46 am
by Tony Li
nicmar wrote: Thu Oct 24, 2019 9:08 am1) I have the Menu panel assigned in the list and as the default in the Standard Dialogue UI. It's position is correct when I edit the game. But when I enter play mode, it's position Y jumps from 0 to 530, causing it to appear in the middle of the screen instead of at the bottom as I wanted. Do you know of any feature that would move the panel on start?
If it's a world space canvas and you've assigned the menu panel GameObject to a character's Dialogue Actor component as a custom menu panel, the Dialogue Actor component will instantiate a copy in a position relative to the character.

Other than that, I don't know why it would move. Is the menu panel part of the Standard Dialogue UI's hierarchy? Is the Standard Dialogue UI's Canvas set to Screen Space or World Space?
nicmar wrote: Thu Oct 24, 2019 9:08 am2) Another problem is that the first option is always selected, causing it to not highlight when I hover (since it's already highlighted). The button design I chose is a Color tint, and the image is a border, that outlines the button. The hover/highlight works on the other buttons. When I click on any of the other options, the border on option 1 blinks briefly. Not sure why
Inspect the Dialogue Manager's Input Device Manager, and untick Always Auto Focus. If the Input Device Manager detects that you're using a mouse (by moving the mouse or clicking it), it will not select the first option. If it detects that you're using a joystick (by moving the joystick or pressing a joystick button), it will select the first option so you can navigate them using the joystick.

Re: Menu panel problems

Posted: Thu Oct 24, 2019 10:27 am
by nicmar
Standard Dialogue UI's Canvas is set to Screen Space - Overlay.

I tried to have the Menu panel both as a child of the Dialogue UI and outside the hierchy, but still under the Standard Dialogue UI's Canvas, and it still changes position.

When I deleted the Standard UI Menu Panel component, it stopped moving it's position. I tried to debug from there. But now it stopped moving at all. Not sure what I'm doing, it's getting late, so I might be confused somehow. :?

Thanks for the trick with the "Always auto focus".

Slowly getting there.. ;)

Re: Menu panel problems

Posted: Thu Oct 24, 2019 11:05 am
by Tony Li
Could a Unity UI layout component, such as Vertical Layout Group or Content Size Fitter, be moving the panel?

Can you send a copy of the dialogue UI to tony (at) pixelcrushers.com?

Re: Menu panel problems

Posted: Mon Oct 28, 2019 2:31 pm
by nicmar
Thanks, the issue stopped happening, I have no idea why. :)

Re: Menu panel problems

Posted: Mon Oct 28, 2019 3:08 pm
by Tony Li
If it happens again, please feel free to send me reproduction files.