标签:#UnityToolBag

Posts

· 2018-04-10 · * Unity * UnityToolBag *

From https://forum.unity.com/threads/moving-scrollview-by-mousedrag.261010/

Used in Unity Tool Bag's Who'sYourDaddy

    scrollPos = GUI.BeginScrollView(scrollViewRect, scrollPos,
                new Rect(0, 0, w - 6 * padding, scrollHeight), false,
                false);
             
    GUI.EndScrollView();
    /* Move by mouse drag */

    // Check if the mouse is above our scrollview.
    if (scrollViewRect.Contains(Event.current.mousePosition))