Search Unity

ReorderableList onMouseUpCallback doesn't work when draggable is set to true

Discussion in 'Scripting' started by The-Little-Guy, Oct 19, 2018.

  1. The-Little-Guy

    The-Little-Guy

    Joined:
    Aug 1, 2012
    Posts:
    297
    I am using the ReorderableList, and I noticed that onMouseUpCallback does not trigger when the third option of the the ReorderableList is set to true like in the code below:

    Code (CSharp):
    1. list = new ReorderableList(evt.actions, typeof(MyAction),
    2.             true, false, false, false);
    3. list.onMouseUpCallback = (ReorderableList list) => {
    4.   Debug.Log("any click");
    5.   UnityEngine.Event currentEvent = UnityEngine.Event.current;
    6.   if (currentEvent.button == 1) {
    7.     Debug.Log("right click");
    8.   }
    9. };
    Any thoughts on how to make it work when it is set to true?