Forum rules - please read before posting.

Problems with menu sliders

Hello, i don't know what happens or what changed to my project, but volume sliders inside options menu aren't sliding anymore, to reduce volume i have to click in a specific point of the volume bar to reduce/raise instead than drag while holding down the mouse button, any tip? Thats something really strange and i don't know how to solve it.

Many thanks. :D

Comments

  • What was the behaviour before, and does your Menu rely on AC or Unity UI for its Source property?

    Clicking inside the bar to raise/reduce it to that value is the behaviour of AC-based sliders. Switching over to Unity UI will let you instead use Unity's own Slider component/behaviour to change its value.

  • To make a rapid prototype I left the AC options menu as the default, so for now I'm using the AC menus instead of UnityUI. I honestly remember that the slider has always worked normally as in the 3d demo so I don't understand what changed (or probably what I touched)

    These are my settings:

    https://ibb.co/9hdNcMW
    https://ibb.co/ZWKzGpC

    Do you see anything out of place?

    I tried both to sample the amount of steps and to try to refresh the menu by trying for a moment to play with settings on Unity UI and then go back to AC menu, but nothing changes.

    All of three menu elements have same settings as the one shared via screenshot.

  • At least for AC menus, the behaviour you're describing you're now getting is how it's always been. I'm not sure how things would have been different without Unity UI.

  • Hmm probably i'm getting confused, but i was pretty sure it was different, i mean a slider is supposed to slide if i keep pressed left mouse button and drag from left to right or viceversa, but it doesnt do that. I'll keep to raise/lower with single click till i start use UnityUI even if i'm a bit scared to switch on UnityUI.

  • Perhaps I'm not clear either.

    The behaviour should be a bit of both - if you hold down the mouse over the slider, it's value will jump to that position. Moving left/right with the mouse - while holding the button - will cause the slider to continue to move.

    Is that not your menu's behaviour? Try loading up the full 3D Demo (scene + Managers) - that should give you the behaviour I'm referring to.

  • Ok i did a try with 3d demo, and it works in both way, mine still working only with jumping to the new mouse position but not sliding while holding the button :(

  • Try mixing and matching yours and the Demo's Settings/Menu Managers - i.e. the 3D Demo's Menu Manager but your Settings Manager, and vice-versa. Which combination gives you the correct behaviour and which doesn't?

  • edited April 2021

    To be sure I tried to disable the toggle drag script and the sliders now work normally. I did a few try to disable toggle drag script with custom message but it doesn't work, any tip?

  • You're referring to this wiki script?

    You can try preventing the script from taking effect when a particular menu (i.e. "Options") is enabled. Replace:

    if (axisName == toggleDragInput)
    

    with:

    if (axisName == toggleDragInput && !PlayerMenus.GetMenuWithName ("Options").IsOn)
    
  • Yes Chris this one. Thank you again :)

  • edited April 2021

    Ok i did a few and this string is giving me compilation errors:

    if (axisName == toggleDragInput && !PlayerMenus.GetMenuWithName ("Options").IsOn)

    Tried instead this:

    if (axisName == toggleDragInput && !PlayerMenus.GetMenuWithName ("Options") == enabled)

    It doesnt work either, i mean it compiles now without errors and sliders works again as usual but instead toggle drag script doesn't work anymore.

  • My mistake.

    if (axisName == toggleDragInput && !PlayerMenus.GetMenuWithName ("Options").IsOn ())
    
  • YES!! That works!! Many many thanks!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.