Search Unity

Bug Automatic Scroll

Discussion in 'Editor & General Support' started by angelpop123, Aug 23, 2022.

  1. angelpop123

    angelpop123

    Joined:
    May 13, 2022
    Posts:
    3
    There is an unwanted behaviour happening for the UI in the new versions of the unity editors.
    upload_2022-8-23_11-4-12.png
    For example the slider in this screenshot can't be used. You can change its position by clicking somewhere on the slider, but as soon as you try to drag it the UI scrolls to the top. The same thing happens when you drag on any UI element, like text fields or buttons. This behaviour didn't happen in the 2021.3.4f version. It appeared in the versions afterwards.
    The UI was made using the UI Toolkit.
     
    Last edited: Aug 23, 2022
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,742
    If I had to guess it might be a bug in the UI Toolkit related to auto-scrolling to the last selected element.

    Perhaps try changing the focus to another item, or to no item. I know on the old UnityEngine.UI system you set the selected GameObject in the EventSystem.

    With UIToolkit I am not sure. My cursory reading of UI Toolkit docs seems to indicate perhaps that system isn't really finished yet or ready for prime time. I direct you to this line:

    "Note: Unity recommends you to use UI Toolkit for your new UI development projects. However, Unity UI (uGUI) and IMGUI are appropriate for certain use cases, and are required to support deprecated projects. For more information, see the Comparison of UI systems in Unity."

    as written in this page:

    https://docs.unity3d.com/Manual/UIElements.html
     
  3. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    7,929
    You probably should be posting this in the correct subforum: https://forum.unity.com/forums/ui-toolkit.178/

    I would be surprised if this can't be customised. I would look through the API documentation to see if there's any appropriate properties for this.
     
  4. angelpop123

    angelpop123

    Joined:
    May 13, 2022
    Posts:
    3