Updating the ReorderableList control to work with Screen Space - Overlay
parent
f92a516d9d
commit
3814471a2b
|
@ -129,7 +129,7 @@ namespace UnityEngine.UI.Extensions
|
||||||
var canvas = _draggingObject.GetComponentInParent<Canvas>();
|
var canvas = _draggingObject.GetComponentInParent<Canvas>();
|
||||||
Vector3 worldPoint;
|
Vector3 worldPoint;
|
||||||
RectTransformUtility.ScreenPointToWorldPointInRectangle(canvas.GetComponent<RectTransform>(), eventData.position,
|
RectTransformUtility.ScreenPointToWorldPointInRectangle(canvas.GetComponent<RectTransform>(), eventData.position,
|
||||||
canvas.renderMode != RenderMode.ScreenSpaceOverlay ? canvas.worldCamera, out worldPoint);
|
canvas.renderMode != RenderMode.ScreenSpaceOverlay ? canvas.worldCamera : null, out worldPoint);
|
||||||
_draggingObject.position = worldPoint;
|
_draggingObject.position = worldPoint;
|
||||||
|
|
||||||
//Check everything under the cursor to find a ReorderableList
|
//Check everything under the cursor to find a ReorderableList
|
||||||
|
|
Loading…
Reference in New Issue